-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated to latest SlackBuild template
- Loading branch information
Showing
1 changed file
with
20 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,26 +4,26 @@ | |
# [email protected] revision date 2019/12/12 | ||
# license (of this script and its accessories, not that of the application it will package): see LICENSE | ||
|
||
APP=mg-troglobit | ||
PRGNAM=mg-troglobit | ||
VERSION=${VERSION:-3.3} | ||
BUILD=${BUILD:-1} | ||
TAG=${TAG:-_SBo} | ||
|
||
if [ -z "$ARCH" ]; then | ||
case "$( uname -m )" in | ||
i?86) ARCH=i486 ;; | ||
i?86) ARCH=i586 ;; | ||
arm*) ARCH=arm ;; | ||
*) ARCH=$( uname -m ) ;; | ||
esac | ||
fi | ||
|
||
CWD=$(pwd) | ||
TMP=${TMP:-/tmp/SBo} | ||
PKG=$TMP/package-$APP | ||
PKG=$TMP/package-$PRGNAM | ||
OUTPUT=${OUTPUT:-/tmp} | ||
|
||
if [ "$ARCH" = "i486" ]; then | ||
SLKCFLAGS="-O2 -march=i486 -mtune=i686 -Wno-unused-result" | ||
if [ "$ARCH" = "i586" ]; then | ||
SLKCFLAGS="-O2 -march=i586 -mtune=i686 -Wno-unused-result" | ||
LIBDIRSUFFIX="" | ||
elif [ "$ARCH" = "i686" ]; then | ||
SLKCFLAGS="-O2 -march=i686 -mtune=i686 -Wno-unused-result" | ||
|
@@ -41,10 +41,10 @@ set -e | |
rm -rf $PKG | ||
mkdir -p $TMP $PKG $OUTPUT | ||
cd $TMP | ||
rm -rf $APP-$VERSION | ||
tar xvf $CWD/${APP/troglobit/}$VERSION.tar.gz | ||
mv ${APP/troglobit/}$VERSION $APP-$VERSION | ||
cd $APP-$VERSION | ||
rm -rf $PRGNAM-$VERSION | ||
tar xvf $CWD/${PRGNAM/troglobit/}$VERSION.tar.gz | ||
mv ${PRGNAM/troglobit/}$VERSION $PRGNAM-$VERSION | ||
cd $PRGNAM-$VERSION | ||
chown -R root:root . | ||
chmod -R u+w,go+r-w,a-s . | ||
|
||
|
@@ -60,40 +60,26 @@ CFLAGS="$SLKCFLAGS" \ | |
--sysconfdir=/etc \ | ||
--localstatedir=/var \ | ||
--mandir=/usr/man \ | ||
--docdir=/usr/doc/$APP-$VERSION \ | ||
--build=$ARCH-slackware-linux \ | ||
|
||
--docdir=/usr/doc/$PRGNAM-$VERSION \ | ||
--build=$ARCH-slackware-linux | ||
make | ||
|
||
make install PREFIX=/usr DESTDIR=$PKG | ||
|
||
mkdir -p $PKG/usr/doc/$APP-$VERSION | ||
cat $CWD/$APP.SlackBuild > $PKG/usr/doc/$APP-$VERSION/$APP.SlackBuild | ||
find $PKG/usr/doc/$APP-$VERSION -type f -exec chmod 644 {} \; | ||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION | ||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild | ||
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; | ||
|
||
mkdir -p $PKG/install | ||
cat $CWD/slack-desc > $PKG/install/slack-desc | ||
|
||
if [ -e $CWD/doinst.sh ]; then | ||
cp $CWD/doinst.sh $PKG/install | ||
fi | ||
|
||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | ||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null | ||
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 | ||
|
||
if [ -d $PKG/usr/man ]; then | ||
( cd $PKG/usr/man | ||
find . -type f -exec gzip -9 {} \; | ||
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done | ||
) | ||
fi | ||
|
||
if [ -d $PKG/usr/info ]; then | ||
gzip -9 $PKG/usr/info/*.info | ||
rm -f $PKG/usr/info/dir | ||
fi | ||
find $PKG/usr/man -type f -exec gzip -9 {} \; | ||
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done | ||
|
||
rm $PKG/usr/doc/$APP-$VERSION/*.md | ||
rm $PKG/usr/doc/$PRGNAM-$VERSION/*.md | ||
|
||
cd $PKG | ||
/sbin/makepkg -l y -c n $OUTPUT/$APP-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} | ||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |