My configuration and packages for Slackware
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

#!/bin/sh
PKGNAM=rocket-config
VERSION=14.2
BUILD=${BUILD:-$(git rev-list HEAD --count)rocket}
ARCH=noarch
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-rocket-config
rm -rf $PKG
mkdir -p $TMP $PKG
# Install package metadata
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Install package docs
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cat $CWD/readme.txt > $PKG/usr/doc/$PKGNAM-$VERSION/readme.txt
cat $CWD/blacklist > $PKG/usr/doc/$PKGNAM-$VERSION/blacklist
# Install all config files
find $CWD/etc -type f ! -name '*.orig' -printf '%P\n' | while read config; do
echo Installing /etc/$config
install -Dm644 $CWD/etc/$config $PKG/etc/$config.new
# Add config lines to doinst.sh
if [ -r $CWD/etc/$config.orig ]; then
echo config etc/$config.new $(cat $CWD/etc/$config.orig | md5sum | cut -d ' ' -f 1) >> $PKG/install/doinst.sh
else
echo config etc/$config.new >> $PKG/install/doinst.sh
fi
done
# Set some special permissions
chmod 755 $PKG/etc/rc.d/rc.* $PKG/etc/X11/xinit/* $PKG/etc/profile.d/* $PKG/etc/cron.*/*
chmod 750 $PKG/etc/sudoers.d
chmod 440 $PKG/etc/sudoers.d/*
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz