nrelease: Reduce the size of /usr/local on the IMG/ISO considerably.
authorSascha Wildner <saw@online.de>
Fri, 26 Apr 2019 08:57:33 +0000 (10:57 +0200)
committerSascha Wildner <saw@online.de>
Fri, 26 Apr 2019 08:57:33 +0000 (10:57 +0200)
* Exchange git with git-lite which should have everything we need for
  our purposes. This gets rid of perl and various p5-* packages.

* Build the bind-tools without option PYTHON. This gets rid of python
  and various py27-* packages.

* While here, use <category>_<port>_{,UN}SET to handle options, instead
  of rolling our own mechanism.

All in all, this commit cuts the number of installed packages from 40
to 22 and reduces /usr/local's size from 300M to 145M.

Thanks to zrj for help and advice.

nrelease/Makefile

index ec44dbc..8d6ca0d 100644 (file)
@@ -57,7 +57,7 @@ DPORTS_EXTRA_PACKAGES?=
 # dports packages to be built and installed on the release ISO
 #
 DPORTS_PACKAGES?=      security/ca_root_nss \
-                       devel/git \
+                       devel/git-lite \
                        dns/bind-tools \
                        net/isc-dhcp44-server \
                        sysutils/cdrtools \
@@ -66,12 +66,8 @@ DPORTS_PACKAGES?=    security/ca_root_nss \
 
 # dports options to use when building packages
 #
-DPORTS_OPTIONS+=               -DBATCH
-.if make(gui)
-DPORTS_OPTIONS.devel_git+=     -DWITH_GUI
-.else
-DPORTS_OPTIONS.devel_git+=     -DWITHOUT_CONTRIB -DWITHOUT_PERL
-.endif
+DPORTS_OPTIONS+=       -DBATCH
+DPORTS_OPTIONS+=       dns_bind-tools_UNSET=PYTHON
 .endif
 
 # Specify which root skeletons are required, and let the user include
@@ -277,7 +273,7 @@ customizeiso:
        # Build and install packages, skip packages already installed
        #
 .for PKG in ${DPORTS_PACKAGES}
-       ${CHROOT_CMD} "cd /usr/dports/${PKG} && make ${DPORTS_OPTIONS} ${DPORTS_OPTIONS.${PKG:S/\//_/g}} install"
+       ${CHROOT_CMD} "cd /usr/dports/${PKG} && make ${DPORTS_OPTIONS} install"
 .endfor
 .for PKG in ${DPORTS_PACKAGES}
        ${CHROOT_CMD} "cd /usr/dports/${PKG} && make ${DPORTS_OPTIONS} clean"