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.
54 lines
1.5 KiB
54 lines
1.5 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
|
|
|
|
# Install all config files
|
|
find $CWD/root -type f ! -name '*.orig' -printf '%P\n' | while read config; do
|
|
case "$config" in
|
|
usr/libexec/slackpkg/functions.d/*)
|
|
echo Installing /$config
|
|
install -Dm644 $CWD/root/$config $PKG/$config
|
|
continue
|
|
esac
|
|
|
|
echo Installing /$config
|
|
install -Dm644 $CWD/root/$config $PKG/$config.new
|
|
|
|
# Add config lines to doinst.sh
|
|
if [ -r $CWD/root/$config.orig ]; then
|
|
echo config $config.new $(md5sum $CWD/root/$config.orig | cut -d ' ' -f 1) >> $PKG/install/doinst.sh
|
|
else
|
|
echo config $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.*/* \
|
|
$PKG/usr/libexec/slackpkg/functions.d/*
|
|
chmod 750 $PKG/etc/sudoers.d
|
|
chmod 440 $PKG/etc/sudoers.d/*
|
|
chmod 600 $PKG/etc/wpa_supplicant.conf.new
|
|
|
|
cd $PKG
|
|
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
|
|
|