diff options
Diffstat (limited to 'core/ports.html')
-rw-r--r-- | core/ports.html | 169 |
1 files changed, 76 insertions, 93 deletions
diff --git a/core/ports.html b/core/ports.html index 9150430..ea3028f 100644 --- a/core/ports.html +++ b/core/ports.html @@ -10,54 +10,14 @@ <h1>1.3. Ports</h1> - <p>For more information read crux handbook: - <a href="https://crux.nu/Main/Handbook3-2#ntoc14">Introduction to pkgutils</a>.</p> - - <dl> - <dt>pkgmk(8)</dt> - - <dd>Makes a software package. A package is an archive of - files (.pkg.tar.gz, .pkg.tar.bz2 or .pkg.tar.xz) - that can be installed using pkgadd(8).</dd> - - <dt>pkgadd(8)</dt> - - <dd>install a software package. A package is an - archive of files (.pkg.tar.gz).</dd> - - <dt>pkginfo(8)</dt> - - <dd>Displays information about software packages that - are installed on the system or that reside in a - particular directory.</dd> - - <dt>pkgrm(8)</dt> - - <dd>Removes/uninstalls a previously installed software - packages.</dd> - - <dt>prt-get(8)</dt> - - <dd>prt-get is a package management tool which - provides additional functionality to crux' package - management system. It works with the local ports tree - and is therefore fully compatible with ports(8) and - pkgmk(8)/pkgadd(8)</dd> - </dl> - <p>This instructions are done <a href="configure.html#chroot">inside chroot</a>.</p> <h2 id="fakeroot">1.3.1. Build as user</h2> - <p>Install fakeroot and create user account, read - <a href="https://crux.nu/Wiki/FakerootPorts">Fakeroot Ports</a>;</p> - - <pre> - # pkgadd /media/crux/opt/fakeroot#1.20.2-1.pkg.tar.xz - </pre> - - <p>Add a user that will be used by ports tools, this example pkgmk;</p> + <p>For more information read + <a href="https://crux.nu/Wiki/FakerootPorts">Fakeroot Ports</a>. + Add a user that will be used by ports tools, this example pkgmk;</p> <pre> # useradd -U -m -d /usr/ports -s /bin/false pkgmk @@ -139,89 +99,112 @@ export MAKEFLAGS="-j2" </pre> - <p>Set separate distribution files, packages and work directories;</p> + <p>Example of complete pkgmk.conf for x86_64 with 4 cores, separate + distribution files, packages and work directories, uses crux mirror + to get the sources.</p> <pre> - # PKGMK_SOURCE_MIRRORS=() - # PKGMK_SOURCE_MIRRORS=(http://crux.nu/distfiles/) + # + # /etc/pkgmk.conf: pkgmk(8) configuration + # + + export CFLAGS="-O2 -march=x86-64" + export CXXFLAGS="${CFLAGS}" + + export MAKEFLAGS="-j4" + + case ${PKGMK_ARCH} in + "64"|"") + ;; + "32") + export CFLAGS="${CFLAGS} -m32" + export CXXFLAGS="${CXXFLAGS} -m32" + export LDFLAGS="${LDFLAGS} -m32" + export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig" + ;; + *) + echo "Unknown architecture selected! Exiting." + exit 1 + ;; + esac + + PKGMK_SOURCE_MIRRORS=(http://crux.nu/distfiles/) PKGMK_SOURCE_DIR="/usr/ports/distfiles" PKGMK_PACKAGE_DIR="/usr/ports/packages" PKGMK_WORK_DIR="/usr/ports/work/$name" + # PKGMK_DOWNLOAD="no" + # PKGMK_IGNORE_FOOTPRINT="no" + # PKGMK_IGNORE_NEW="no" + # PKGMK_NO_STRIP="no" + # PKGMK_DOWNLOAD_PROG="wget" + # PKGMK_WGET_OPTS="" + # PKGMK_CURL_OPTS="" + # PKGMK_COMPRESSION_MODE="gz" + + # End of file </pre> <h2 id="prtget">1.3.4. Configure prt-get</h2> - <p>Edit /etc/prt-get.conf and change to activate contrib port collection;</p> + <p>Edit /etc/prt-get.conf;</p> <pre> + ### + ### prt-get conf + ### + + # note: the order matters: the package found first is used + prtdir /usr/ports/core + prtdir /usr/ports/opt + prtdir /usr/ports/xorg + + # the following line enables the multilib compat-32 collection + #prtdir /usr/ports/compat-32 + # the following line enables the user maintained contrib collection prtdir /usr/ports/contrib - </pre> - <pre> + # 6c37 team provides a collection with freetype-iu, fontconfig-iu + # and cairo-iu ports. + #prtdir /usr/ports/6c37 + + ### use mypackage form local directory + # prtdir /home/packages/build:mypackage + ### log options: - writelog enabled # (enabled|disabled) - logmode overwrite # (append|overwrite) - rmlog_on_success yes # (no|yes) - logfile /usr/ports/pkgbuild/%n.log + writelog enabled # (enabled|disabled) + logmode overwrite # (append|overwrite) + rmlog_on_success yes # (no|yes) + logfile /usr/ports/pkgbuild/%n-%v-%r.log # path, %p=path to port dir, %n=port name # %v=version, %r=release - </pre> - <pre> + ### use alternate cache file (default: /var/lib/pkg/prt-get.cache + # cachefile /mnt/nfs/cache + ### print README information: readme verbose # (verbose|compact|disabled) - </pre> - <pre> ### prefer higher versions in sysup / diff preferhigher yes # (yes|no) - </pre> - <pre> + ### use regexp search + # useregex no # (yes|no) + ### run pre- and post-installs scripts; yes is equivalent to the ### --install-scripts option - runscripts yes # (no|yes) - </pre> + runscripts yes # (no|yes) + + + ### EXPERT SECTION ### - <pre> ### alternative commands - makecommand sudo -H -u pkgmk fakeroot pkgmk + makecommand sudo -H -u pkgmk fakeroot pkgmk addcommand pkgadd removecommand pkgrm runscriptcommand sh </pre> - <h2 id="pkginst">1.3.5. Install extra ports</h2> - - <p>Install additional ports like wireless-tools and grub2</p> - - <pre> - cp $CHROOT/media/crux/opt/* $CHROOT/usr/ports/packages - cp $CHROOT/media/crux/xorg/* $CHROOT/usr/ports/packages - </pre> - - <pre> - pkgadd /usr/ports/packages/dbus#1.10.2-1.pkg.tar.xz - pkgadd /usr/ports/packages/expat#2.1.0-1.pkg.tar.xz - pkgadd /usr/ports/packages/libnl#3.2.27-1.pkg.tar.xz - pkgadd /usr/ports/packages/libpng#1.6.19-1.pkg.tar.xz - pkgadd /usr/ports/packages/freetype#2.6.1-1.pkg.tar.xz - pkgadd /usr/ports/packages/libffi#3.2.1-2.pkg.tar.xz - pkgadd /usr/ports/packages/sqlite3#3.9.2-1.pkg.tar.xz - pkgadd /usr/ports/packages/python#2.7.10-1.pkg.tar.xz - pkgadd /usr/ports/packages/glib#2.46.2-1.pkg.tar.xz - pkgadd /usr/ports/packages/grub2#2.00-7.pkg.tar.xz - pkgadd /usr/ports/packages/grub2-efi#2.00-4.pkg.tar.xz - pkgadd /usr/ports/packages/wireless-tools#29-1.pkg.tar.xz - pkgadd /usr/ports/packages/wpa_supplicant#2.5-2.pkg.tar.xz - pkgadd /usr/ports/packages/lvm2#2.02.133-1.pkg.tar.xz - pkgadd /usr/ports/packages/mdadm#3.3.4-1.pkg.tar.xz - pkgadd /usr/ports/packages/efivar#0.21-1.pkg.tar.xz - pkgadd /usr/ports/packages/efibootmgr#0.12-1.pkg.tar.xz - pkgadd /usr/ports/packages/dosfstools#3.0.26-1.pkg.tar.xz - </pre> - <a href="index.html">Core OS Index</a> <p> This is part of the SysDoc Manual. |