aboutsummaryrefslogtreecommitdiff
path: root/network/yadifa/yadifa.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/yadifa/yadifa.SlackBuild')
-rw-r--r--network/yadifa/yadifa.SlackBuild19
1 files changed, 10 insertions, 9 deletions
diff --git a/network/yadifa/yadifa.SlackBuild b/network/yadifa/yadifa.SlackBuild
index 0b27ad77459c..c730947160a4 100644
--- a/network/yadifa/yadifa.SlackBuild
+++ b/network/yadifa/yadifa.SlackBuild
@@ -23,11 +23,12 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=yadifa
-VERSION=${VERSION:-2.3.8}
-VSUFFIX=${VSUFFIX:-7713}
+VERSION=${VERSION:-2.3.8_7713}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+SRCVERSION=$(echo $VERSION | tr _ -)
+
if ! grep -q "^yadifa:" /etc/group; then
echo "$0: Error: $PRGNAM group (yadifa) doesn't exist."
echo "$0: Try creating one with:"
@@ -84,9 +85,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf yadifa-$VERSION-${VSUFFIX}
-tar xvf $CWD/yadifa-$VERSION-${VSUFFIX}.tar.gz || tar xvf $CWD/$VERSION-${VSUFFIX}.tar.gz
-cd yadifa-$VERSION-${VSUFFIX}
+rm -rf yadifa-$SRCVERSION
+tar xvf $CWD/yadifa-$SRCVERSION.tar.gz || tar xvf $CWD/$SRCVERSION.tar.gz
+cd yadifa-$SRCVERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -100,7 +101,7 @@ find -L . \
--libdir=/usr/lib/yadifa \
--localstatedir=/var/lib/yadifa \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION-${VSUFFIX} \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
--with-logdir=/var/log/yadifa \
--enable-silent-rules \
--enable-shared=$SHARED \
@@ -115,8 +116,8 @@ make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION-${VSUFFIX}
-install --mode=644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION-${VSUFFIX}/$PRGNAM.SlackBuild
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+install --mode=644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
install --mode=644 $CWD/slack-desc $PKG/install/slack-desc
@@ -146,4 +147,4 @@ install --mode=644 $CWD/yadifa.logrotate $PKG/etc/logrotate.d/yadifa.new
rm -rf $PKG/etc/yadifa/yadifad.conf
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${VSUFFIX}-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}