commit a748c7e529fece1b9800a14fc5213fe6d022ff1a Author: mid-kid Date: Wed Dec 7 16:43:36 2016 +0100 Initial commit diff --git a/doinst.sh b/doinst.sh new file mode 100644 index 0000000..f9cb8a5 --- /dev/null +++ b/doinst.sh @@ -0,0 +1,13 @@ +#!/bin/sh +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + diff --git a/rocket-config.SlackBuild b/rocket-config.SlackBuild new file mode 100755 index 0000000..b7e7dc3 --- /dev/null +++ b/rocket-config.SlackBuild @@ -0,0 +1,26 @@ +#!/bin/sh + +PKGNAM=rocket-config +VERSION=14.2 +BUILD=${BUILD:-1rocket} +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-rocket-config +rm -rf $PKG +mkdir -p $TMP $PKG + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +find $CWD/etc -type f -printf '%P\n' | while read config; do + echo Installing /etc/$config + install -Dm644 $CWD/etc/$config $PKG/etc/$config.new + echo config etc/$config.new >> $PKG/install/doinst.sh +done + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz + diff --git a/slack-desc b/slack-desc new file mode 100644 index 0000000..dd2c513 --- /dev/null +++ b/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +rocket-config: rocket-config (my configuration files) +rocket-config: +rocket-config: This package contains my custom system configuration, +rocket-config: to be updated through slackpkg. +rocket-config: +rocket-config: +rocket-config: +rocket-config: +rocket-config: +rocket-config: +rocket-config: