aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-07-22 02:25:31 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-07-22 02:25:31 +0000
commit5491100afa473c45f96667ce6f89703d42e01503 (patch)
tree3341e9ea6b9672228ab1019b6b0cebbc97c142cd /app
parent5158fb5c0ffc7fa2591d3ea639095816ca4f01fd (diff)
downloadslackbuilds-5491100afa473c45f96667ce6f89703d42e01503.tar.gz
slackbuilds-5491100afa473c45f96667ce6f89703d42e01503.tar.bz2
newsbeuter: adding newsbeuter; wyrd: adding wyrd; remind: adding remind; ddclient: adding ddclient; inadyn: adding inadyn
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2230 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'app')
-rw-r--r--app/antivirus/clamav/Manifest33
-rwxr-xr-xapp/antivirus/clamav/clamav.SlackBuild4
-rw-r--r--app/misc/wyrd/Manifest24
-rw-r--r--app/misc/wyrd/slack-required4
-rw-r--r--app/misc/wyrd/wyrd.SlackBuild286
5 files changed, 333 insertions, 18 deletions
diff --git a/app/antivirus/clamav/Manifest b/app/antivirus/clamav/Manifest
index b73da13a..83f9a32f 100644
--- a/app/antivirus/clamav/Manifest
+++ b/app/antivirus/clamav/Manifest
@@ -1,23 +1,24 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
DIST clamav-0.95.1.tar.gz 24260964 MD5 c802d4b372e455849cfcb0d776fc72d8 RMD160 80769c09ca15c864a578206feabe9cc4a3d985b4 SHA1 a469b0128cf5e9d18392a0385417fc5e4575bfc7 SHA256 6161a0ffa988166cfe3c2afb3056b791f3f70285fc87f547612427bd57f63b7d SHA512 a74a7bd400453713bea17368e473b97c6f7f0462d1fe41dc1b36735f51925f52fd0e7b9e0f5535b10b658e18421ea412950dac626a4086c9e97aa8e6abe58e2a
-MKBUILD clamav.mkbuild 3507 MD5 3e9223e86c6b9039d373d2d58bcf986e RMD160 9da8d0677913b805bb60743501cc7adb0ba02b5b SHA1 a17f62361805332f8d4bfde6140fe3c8a60d859e SHA256 3b1b89380b2e9370ff4b079f93a867ca0de2f9679203b3a981f59848ed3b1eea SHA512 61e09d0e0fbeee0f648dced94d7901cb4e08fd49bbc4a4d072b00d347e0e2e00692d2a4c2a7717912580d96467e61ccb5a9f98f52a5ef4a9a7c726e589983d97
-SLACKBUILD clamav.SlackBuild 10138 MD5 d26b879a9f4a4ebe7b6aa7882d19f13d RMD160 2b49180d0aa1a86e3cc0d2b4631c5e5f4ec81958 SHA1 549e030ba8a8fa9e0022e2471aff1cc780cdb228 SHA256 87c0b1fd915913bf6145d3c7379064adce115f6c0ca2e8819d213bbfe64e70c4 SHA512 3d33aed216d7b59959ac8367b9916dfb8067a9ce53c49e4643e806ef4117118e1ac5bd540adff608e003daed1dbd692ef32427b6072be0752746a951fac59c2f
+DIST clamav-0.95.2.tar.gz 25137010 MD5 930362397d30e01ba81b5f24c1046d48 RMD160 83cab51c224251316288e4c3189ba91f640e9f82 SHA1 7544b39d84f2233b984a9c2ce3ef74d407add483 SHA256 f5f2a5a9984fd1ade69a7c2cc78da2f5dc0c505f94ab58fb2aa6613399ab1c56 SHA512 8890ba8b04fba2517e60598a1f219b0b56887dba3e01b5ae10b587daefd381eb664bbf482d7be4e6c0fa007b43ec4c637df54de3321603c9fc40452487bbde34
+MKBUILD clamav.mkbuild 3507 MD5 a17e186de27109cddfeda193edeaa907 RMD160 f5a14557b2312cdf17a4e1f0000d622da37402cf SHA1 465e393269a4bbad9f325a7c4695fa488d0a695d SHA256 197a6523434f362681d42ad138194c7b9dbac26aa7df6fe145d3b87e6d61b8fc SHA512 942d7faddcffe5e9664fc2b93e265fda7dc7541dbb1dbb3610066b544e44da3b460766175291f605dbb1ed37016405438b70fe1d168a9aa8ed583ce5455b8e67
+SLACKBUILD clamav.SlackBuild 10138 MD5 f316c037231fcc763c392fc6b687a713 RMD160 d068e703e60a939999701d8185ebb4158371e101 SHA1 a01d3a1e7f98af2bbe8c257a6c9d6d4bb9c98e2b SHA256 f7df7a08df8ef45d708f0babbde9d505dc39865469d4fdc5a1e5ffe3c0d546e1 SHA512 5b52c4d0068ad6e6a1553c480d7373dadada8df039e8cd18cbfd9101400760ccb1a1d187aa1f495a612117bf7aface607739d132091935e20ff3c65cb037eb21
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-iQIcBAEBAgAGBQJJ81fMAAoJEEHL93ESzgeiznsP/j6sblZEeCbFjQSoaYD12Fkq
-43w+VVx/+VFntfZhunnYx0FaQ2vaase9Va3pxFOVw3SM2PCu7GG3fNGU5RepU24N
-wxQvc6f/K+JUXeNGeaDagg6dV8tYFo9Mt7CjJPwB+rgzN+krQHnHQFdByaa3VEh0
-XlUqWx653Y/wS3EWJrTbLxUGA6Tz9pHgIOi9CpitKXPWVAyfuJObD82JXNC7B0Pn
-8HzwS+VD7lpAELCtHZNFyzehl2YgDJ1el/7DipIg7fz5vrcDRYvRHoYReRc/ZSe5
-9pkWgEShqWRLm2nixFhpjJ7FAx2pMp8RMOfhn8Pg05rZM6hFvCexWzLrJdrpMgWf
-6JKiRQUAK3CUpqV2O0BYhgokKEdqYOlj3Oh8nv8+Q/tu3g0V7Z0oLE+OilSywI/L
-lZJfNV8Q1NBvxxD9cooHvavB3LCirgrr5Udo/EasdE3wsNHxcOQreLWR3kIRbMgc
-TI2wNIHBEac5zZrKwlHvH55ck+YjWKPQ/LiN90ggKRWFDqda1xSmgBoKNq6R5P51
-3cDkl2DMHWtFLjoTHRKgnctMyArUUBwLkfPy73PzYJiloxS5rxpvpEMhftQfKEwI
-q7nIkrmOjPEuusSwYK/RYs9UIazIvhGXg/TAoDKfz3ypEhJy9Ib/Kz4uugCYjD+x
-G0dUk6EyNgCmDElG8fY/
-=xWrg
+iQIcBAEBCAAGBQJKY5k4AAoJEEHL93ESzgeiX1sQAL1aamzL4FczobU+jqJLsrCn
+ZnVue8/iAaXaruZGErTeSIobX3a6D9ww3yuOz4ACXUznrg5O5jHHzxeqf+wQ2vdQ
+Rw9FE1itXM+tcdIX8A5QMYUKNjXPtHpaq3Kh+9I73XBbz3Xd0jU6eN4zNIspsZuY
+oOhaZuT/zfXye7qX4qIS7KqKj9p3XU6mJ7nSS9PciuYNljVy037kOy+v1smTButQ
+eeCKP1xtTaVW4Zro9iEcQJkPsWq0//Ny3AESK7A/2/jtKanzoJa+HD5mGyqxQsAG
+IpSOMuS4Lu2dGTQ5vGndM09Y0YJlQg36VPi/WAornRspxdxzSgKdPokvkGRdVUwo
+XNVAVR0jGFuwqlzgCLQv1c9/9OwsxS+9ChnFqYUoeW9ommsQupZyJJ1nakkMZkup
++atRstdmumNSrRfzu+0sGJIfSu3a0QGf1qB13i8pE6ii7aG2alSFwAKrMWuJ5Bso
+/G6tsXGSqkV5YvrJ26DwyqvOPZy2ZAZkRz8ka0EQEx9iAWpwAZG4do/tvPbEO9HG
+jO6/fMUIVcn1/1Vz+8+EnsMCKlyL0JSkdKzsSWZW6Xrlog1VDLSliLadgtH1tLru
+wEVUP4fkIDOPZ5v3+QrQopuKgqM9KEL8kDOTGwmLgrrm98aSemRsDUdyT5H1TZao
+icnVdKIrYg9JEjYH8Cat
+=MFZT
-----END PGP SIGNATURE-----
diff --git a/app/antivirus/clamav/clamav.SlackBuild b/app/antivirus/clamav/clamav.SlackBuild
index 6133c9ab..dd32a5a1 100755
--- a/app/antivirus/clamav/clamav.SlackBuild
+++ b/app/antivirus/clamav/clamav.SlackBuild
@@ -16,7 +16,7 @@
#
# slackbuild for clamav, by Sivio Rhatto
# requires:
-# tested: clamav-0.95.1
+# tested: clamav-0.95.2
# model: generic.mkSlackBuild $Rev: 805 $
#
@@ -32,7 +32,7 @@ CWD="$(pwd)"
SRC_NAME="clamav"
PKG_NAME="clamav"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=0.95.1}
+SRC_VERSION=${VERSION:=0.95.2}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
diff --git a/app/misc/wyrd/Manifest b/app/misc/wyrd/Manifest
new file mode 100644
index 00000000..aa6ec04a
--- /dev/null
+++ b/app/misc/wyrd/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST wyrd-1.4.4.tar.gz 226757 MD5 a376c05ba614625da06082d850c742c7 RMD160 8478610ab5d071910b638b46f84b119f81826a7b SHA1 86353034316e7d5f061ae2c11f7703912a29fe70 SHA256 154f5cefc86d43077f3c150e5b50a27d33fe7a7e50d7b90f39d16f054f5c570a SHA512 944e76774320d7c0109fdb22c03a2ac100399c2f4bd250c5d8c35eff5a44671b2e7a722c11b59b02bfe3e9b24ab6e3153306139ee379f1017c750b2cc81ccfb7
+MKBUILD wyrd.mkbuild 4865 MD5 634532923f33c7b56328792c8d8a31b6 RMD160 df65da14ee3fd2af8c0782b58479abd431d29f7c SHA1 3132cb65aba720e07ede32322db3b3861a39548d SHA256 2fe7f07c2410d60af02da9094329854b4514a826d9ddcb7fb5ab4be3ee3a9fff SHA512 aff9ba7f34b09616547a4432e118187e87209ff958530b0949981b2c9edd19be49a425ed39a58b46855060b85db26e7896db9f59891a74434913bdba74d99f72
+SLACK-REQUIRED slack-required 75 MD5 cae00dacbcee8463ca1b1bd6fae495bf RMD160 7cf5e067b39c950c572a5137d749a7a0e7443349 SHA1 ee8b2f518d078bc335492c2f2f149cb159ae95ac SHA256 28524767a9ed0a0c641d4e87dd3965ce941663d2f0c0888f1452ed9252a333a6 SHA512 2124432a8c473b81653d40b67b2a258e4507b6453e86ba8e1606be261475b71b940194e6733bf6835c5cb552ed9dfee91fbae8dde8be181341af2c483c26c050
+SLACKBUILD wyrd.SlackBuild 8327 MD5 964c92bcc0d65195e718762fae673750 RMD160 2ad00bf2c263dd260946ad3f8ae1a72357d4bda3 SHA1 ce78f9d39540883398ba77609cd0c2090919b8c1 SHA256 14908d95de71daf54886022e88e02c731765096571650c1380b184362cb69891 SHA512 c05df4d64b997e893fe8394006ac26aa7b4d298f4bbc432110cb902dab65e52e9128448de4b0f9275543197ff8a5f5038f211984fa45d62ec7827a9c4bf64fb4
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKZIuGAAoJEEHL93ESzgeiUekQAJUZ937qidb7IUjxXGoYD4R8
+nLfhg2J+H3QHWcf2KSEh0d4ACaCYHO2eIy8MPqjdWhroaGaOAMm0ptzDlP08rmPk
+gXVQ1lDU+rSLxQJomBITCoK9jk1PMZ/eRr4ypjUVoKv/ulWuvuh9xP/Rdr4gBw7Y
+8pn2cmCSxwaoaxnjpaOUUuw7yLJ0RRMZ2sfg5vny2o6UuhP2J8qH59YAVerjtVJt
+XkQgWZbtvsmklRnEmHfZT6rsU6L0GTj28Zni97El1Oe3h288HqN6COm7sr1m+lw6
+LavYlk6XPXvrZxYLVdP5TGWA6wu0GtCniQQX1U5zpsVoxVRdefXWerHD5QIGkiU3
+uv6jkTtPcAMjcsvxGJ/Q7eU3vFAWyBQ1a9uVN1tn16udSOJRFtn8w0oUSVPy5aqg
+V7OrilmvBkMmDT2qmfUqKdcxGq57THs4e2+4Of3cCUrykkbUq08gUfZj4rLFUwbk
+PvWWDi+nzSdkspo+VgR4dVWBZM1c4nDWl4p0Rn7O2+vkrRujcD9zJUElv9ZAk59o
+9WQeU58KL9HcSiKRhJ3ntyNg3K/HzuiHqqrRLm4pGN5ipsX2+razgEWsabivnAbj
+2sYd7+2BjF61zarMCv2oKHEo+BU1lSiRI7GsqwO9sAtwoMG3sT2wvXo1Db08f2Q/
+zv1nGe50lfWophxrhbbk
+=dn3H
+-----END PGP SIGNATURE-----
diff --git a/app/misc/wyrd/slack-required b/app/misc/wyrd/slack-required
new file mode 100644
index 00000000..a0a0ef8f
--- /dev/null
+++ b/app/misc/wyrd/slack-required
@@ -0,0 +1,4 @@
+# Dependency list to wyrd
+#
+# dependency [condition] [version]]
+remind
diff --git a/app/misc/wyrd/wyrd.SlackBuild b/app/misc/wyrd/wyrd.SlackBuild
new file mode 100644
index 00000000..7a7984c7
--- /dev/null
+++ b/app/misc/wyrd/wyrd.SlackBuild
@@ -0,0 +1,286 @@
+#!/bin/bash
+#
+# wyrd.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# wyrd.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for wyrd, by Silvio Rhatto
+# requires: remind
+# tested: wyrd-1.4.4
+# model: generic.mkSlackBuild $Rev: 805 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="wyrd"
+PKG_NAME="wyrd"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=1.4.4}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
+TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
+REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="app/misc/wyrd"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
+
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
+
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://pessimization.com/software/wyrd/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
+
+ # Manifest signature checking
+ if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then
+ echo "Checking Manifest signature..."
+ gpg --verify $CWD/Manifest
+ if [ "$?" != "0" ]; then
+ exit $ERROR_MANIFEST
+ fi
+ fi
+
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`"
+ MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+ MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`"
+
+ if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
+ MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
+ else
+ MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
+ fi
+
+ if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
+ continue
+ fi
+
+ echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..."
+
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`"
+ SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
+
+ # Check source code size
+ if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then
+ echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "Size match."
+ fi
+
+ # Check source code integrity
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
+ if [ $ALGO = "rmd160" ]; then
+ ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
+ else
+ ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`"
+ fi
+ ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`"
+ ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }')
+ if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then
+ echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "$ALGO match."
+ fi
+ done
+
+ done
+
+else
+ exit $ERROR_MANIFEST
+fi
+
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and link manpages
+if [ -d "$PKG/$PREFIX/man" ]; then
+ ( cd "$PKG/$PREFIX/man"
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Install documentation
+DOCS="COPYING ChangeLog README"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# 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---------------------------------------------------------|
+wyrd: wyrd
+wyrd:
+wyrd: Wyrd is a text-based front-end to Remind, a sophisticated
+wyrd: calendar and alarm program.
+wyrd:
+wyrd:
+wyrd:
+wyrd:
+wyrd:
+wyrd:
+wyrd:
+EODESC
+
+# Move config files to .new to avoid overwriting any system config
+for config_file in etc/wyrdrc; do
+ mv $PKG/$config_file $PKG/$config_file.new
+done
+
+# Add a post-installation script (doinst.sh)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EOSCRIPT > "$PKG/install/doinst.sh"
+config() {
+ NEW="\$1"
+ OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .sample)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .dist)"
+
+ # 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...
+}
+
+mkgroup() {
+ GROUP="\$1"
+ if ! grep -qe "^\$GROUP:" etc/group; then
+ echo Creating group \$GROUP...
+ chroot . /usr/sbin/groupadd \$GROUP
+ fi
+}
+
+mkuser() {
+ USER="\$1"
+ if [ ! -z "\$2" ]; then
+ GROUP="\$2"
+ else
+ GROUP="\$USER"
+ fi
+ if ! grep -qe "^\$USER:" etc/passwd; then
+ echo Creating user \$USER...
+ chroot . /usr/sbin/useradd \$USER -g \$GROUP
+ fi
+}
+
+config etc/wyrdrc.new
+EOSCRIPT
+
+# Build the package
+cd "$PKG"
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
+fi