about summary refs log tree commit diff stats
path: root/core/ports.html
diff options
context:
space:
mode:
Diffstat (limited to 'core/ports.html')
-rw-r--r--core/ports.html63
1 files changed, 28 insertions, 35 deletions
diff --git a/core/ports.html b/core/ports.html
index 2d1a17d..d724d76 100644
--- a/core/ports.html
+++ b/core/ports.html
@@ -13,7 +13,16 @@
         <p>This instructions are done
         <a href="configure.html#chroot">inside chroot</a>.</p>
 
-        <h2 id="fakeroot">1.3.1. Build as user</h2>
+        <h2 id="filesystem">1.3.1. Ports Layout</h2>
+
+	<p>Make sure follow directories exist;</p>
+
+	<pre>
+	#  mkdir /usr/ports
+	#  mkdir -p /usr/ports/{distfiles,packages,work,pkgbuild}
+	</pre>
+
+        <h2 id="fakeroot">1.3.2. Build as user</h2>
 
         <p>For more information read
 	<a href="https://crux.nu/Wiki/FakerootPorts">Fakeroot Ports</a>.
@@ -31,22 +40,9 @@
         </pre>
 
         <pre>
-        # chmod -R 774 /usr/ports
-        # chmod 775    /usr/ports
-        </pre>
-
-        <h2 id="filesystem">1.3.2. Ports Layout</h2>
-
-        <p>This configuration will build and save files
-        inside home directory of the user pkgmk. Work directory
-        will be mounted on ram to speed up the build process and
-        added to fstab. Let's start by creating layout directories</p>
-
-        <pre>
-        # sudo -u pkgmk mkdir /usr/ports/distfiles
-        # sudo -u pkgmk mkdir /usr/ports/packages
-        # sudo -u pkgmk mkdir /usr/ports/work
-        # sudo -u pkgmk mkdir /usr/ports/pkgbuild
+	#  chown pkgmk /usr/ports/{distfiles,packages,work,pkgbuild}
+	#  chown pkgmk:pkgmk /usr/ports/pkgbuild
+	#  chmod g+w /usr/ports/pkgbuild
         </pre>
 
         <p>Configure to
@@ -65,7 +61,6 @@
         pkgmk /usr/ports/work tmpfs size=30G,uid=102,defaults,mode=0750 0 0
         </pre>
 
-
         <h2 id="pkgmk">1.3.3. Configure pkgmk</h2>
 
         <p>Read <a href="https://crux.nu/Handbook3-3#ntoc22">4.5. Adjust/Configure the Package Build Process</a>
@@ -81,10 +76,10 @@
         # /etc/pkgmk.conf: pkgmk(8) configuration
         #
 
-        export CFLAGS="-O2 -march=x86-64"
+        export CFLAGS="-O2 -g -march=x86-64 -pipe"
         export CXXFLAGS="${CFLAGS}"
 
-        # export MAKEFLAGS="-j$(nproc)"
+        # export MAKEFLAGS="-j2"
 
         case ${PKGMK_ARCH} in
                 "64"|"")
@@ -101,13 +96,14 @@
                         ;;
         esac
 
-        # PKGMK_SOURCE_MIRRORS=()
+        #PKGMK_SOURCE_MIRRORS=(http://c9.root.sx/ports/distfiles/)
         # PKGMK_SOURCE_DIR="$PWD"
+        PKGMK_SOURCE_DIR="/usr/ports/distfiles"
         # PKGMK_PACKAGE_DIR="$PWD"
+        PKGMK_PACKAGE_DIR="/usr/ports/packages"
         # PKGMK_WORK_DIR="$PWD/work"
+        PKGMK_WORK_DIR="/usr/ports/work/$name"
         # PKGMK_DOWNLOAD="no"
-        # PKGMK_IGNORE_SIGNATURE="no"
-        # PKGMK_IGNORE_MD5SUM="no"
         # PKGMK_IGNORE_FOOTPRINT="no"
         # PKGMK_IGNORE_NEW="no"
         # PKGMK_NO_STRIP="no"
@@ -139,23 +135,20 @@
 
         # note: the order matters: the package found first is used
         prtdir /usr/ports/core
-
-        # ports described on this documentation
+        prtdir /usr/ports/opt
+        prtdir /usr/ports/contrib
         prtdir /usr/ports/c9-ports
+        prtdir /usr/ports/xorg
 
         # 6c37 team provides a collection with freetype-iu, fontconfig-iu
         # and cairo-iu ports.
-        prtdir /usr/ports/6c37
-        prtdir /usr/ports/6c37-dropin
-
-        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
+        # prtdir /usr/ports/6c37-dropin
+        # prtdir /usr/ports/6c37
 
         ### use mypackage form local directory
         # prtdir /home/packages/build:mypackage
@@ -171,11 +164,11 @@
         ### use alternate cache file (default: /var/lib/pkg/prt-get.cache
         # cachefile /mnt/nfs/cache
 
-        ### print README information:
+        ### print readme information:
         readme verbose           # (verbose|compact|disabled)
 
         ### prefer higher versions in sysup / diff
-        preferhigher yes      # (yes|no)
+        preferhigher no     # (yes|no)
 
         ### use regexp search
         # useregex no        # (yes|no)
@@ -185,10 +178,10 @@
         runscripts yes            # (no|yes)
 
 
-        ### EXPERT SECTION ###
+        ### expert section ###
 
         ### alternative commands
-        makecommand      sudo -H -u pkgmk -g pkgmk fakeroot pkgmk
+        makecommand      sudo -h -u pkgmk fakeroot pkgmk
         addcommand       sudo pkgadd
         removecommand    sudo pkgrm
         runscriptcommand sudo sh