#!/bin/bash # The VERSION is automatically determined at the bottom of this # script, based on the version number in /usr/doc. BUILD=16_slack14.1 # The slackpkg package in Slackware is arch neutral and has no # source package, so we just copy the version in Slackware as-is. # Record toolchain & other info for the build log: slackbuildinfo # Paths to skeleton port's source & real Slackware source tree: export CWD=$SLACKSOURCE/$PKGSERIES/$PKGNAM export PORTCWD=$PWD # Wipe existing package from the tree: rm -fv $PKGSTORE/ap/slackpkg-* # Temporary build locations: export TMPBUILD=$TMP/build-$PKGNAM export PKG=$TMP/package-$PKGNAM mkpkgdirs # Delete & re-create temporary directories then cd into $TMPBUILD tar xvvf $SLACKSOURCE/../slackware*/ap/slackpkg-*.t?z # Mirrors are included in slackpkg by default - they just need # uncommenting. # Set the arch to ARM by default: sed -i 's?^#ARCH=.*?ARCH=arm?g' etc/slackpkg/slackpkg.conf.new # Add a new mirror: install -vpm644 $PORTCWD/mirrors-arm.sample usr/doc/slackpkg-*/ # Switch Slackware GPG key with ARMedslack's, since AS's packages aren't signed # by Slackware. # This should have been taken care of by Piterpunk upstream a while ago. #sed -i 's/^SLACKKEY.*=\(.*\)$/SLACKKEY="ARMedslack Security (ARMedslack Linux Project Security) "/' usr/sbin/slackpkg sed -i 's?ARMedslack Security (ARMedslack Linux Project Security) ?Slackware ARM (Slackware ARM Linux Project) ?g' usr/libexec/slackpkg/core-functions.sh # Quit if the system date is at the epoch (1970) since this breaks GPG and # causes users to be confused. xzcat $PORTCWD/sources/slackpkg-quit-on-epoch.patch.xz || patch --verbose -p1 || exit 1 # Rebuild package: chown root:root . # Not noarch because we've switched the default Arch to be arm. VERSION=$( ls -d usr/doc/slackpkg-* | cut -d- -f2 | cut -d/ -f1 ) makepkg -l y -c n $PKGSTORE/ap/slackpkg-$VERSION-noarch-$BUILD.txz #EOF