if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH="ia32" ;;
- x86_64*) ARCH="x64" ;;
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
exit 0
fi
+if [ "x86_64" != "${ARCH}" -a "i586" != "${ARCH}" ]; then
+ echo
+ echo "*************************************************************"
+ echo "It seems you are not running an x86 or x86_64 system."
+ echo "dart-sass binaries only support x86 and x86_64 architectures."
+ echo "*************************************************************"
+ echo
+ exit 1
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "x64" ]; then
+if [ "$ARCH" = "x86_64" ]; then
+ ARCHID="x64"
LIBDIRSUFFIX="64"
-else
+elif [ "$ARCH" = "i586" ]; then
+ ARCHID="ia32"
LIBDIRSUFFIX=""
fi
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION-linux-$ARCH.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION-linux-$ARCHID.tar.gz
cd $PRGNAM
-mkdir -p $PKG/usr/bin $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM
+#mkdir -p $PKG/usr/bin $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM
sed -i "s/\/src\//\/..\/lib$LIBDIRSUFFIX\/$PRGNAM\//g" sass
-cp sass $PKG/usr/bin/
-cp src/dart src/sass.snapshot $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/
+install -D -t $PKG/usr/bin/ sass
+install -D -t $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/ src/dart src/sass.snapshot
chown -R root:root $PKG
find -L $PKG \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Stripping the binary makes it not work
+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
# Copy program license into the package
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$PRGNAM-$VERSION
mkdir -p $PKG/usr/bin $PKG/etc/$PRGNAM $PKG/usr/share/icons/oxygen/base/22x22/status
cp fdpowermon $PKG/usr/bin/
cp theme.cfg $PKG/etc/$PRGNAM/
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Fix permissions
+chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/examples/server/poetry.lock
+
# Copy udev rules
mkdir -p $PKG/etc/udev/rules.d
cat $CWD/70-u2f.rules > $PKG/etc/udev/rules.d/70-u2f.rules
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
if [ "x86_64" != "${ARCH}" ]; then
echo
echo "*************************************************************"
exit 1
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
-if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
- echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
- exit 0
-fi
-
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
mkdir -p $PKG/usr/bin $PKG/usr/share/applications
mv flashplayer $PKG/usr/bin/saflashplayer
cp -a $CWD/saflashplayer.desktop $PKG/usr/share/applications/com.adobe.flashplayer.desktop
+
+# Stripping the binary causes it to segfault
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -aR LGPL license.pdf $PKG/usr/doc/$PRGNAM-$VERSION/
+
chown -R root:root $PKG
find -L $PKG \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-# Stripping the binary causes it to segfault
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -aR LGPL license.pdf $PKG/usr/doc/$PRGNAM-$VERSION/
+
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
# Copy the slack-desc into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Make the package
cd $PKG
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Copy and compress man pages
-cp -aR man $PKG/usr/
+mkdir -p $PKG/usr/man
+cp -aR man $PKG/usr/man/man1
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
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH="ia32" ;;
- x86_64*) ARCH="x64" ;;
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
+if [ "x86_64" != "${ARCH}" ]; then
+ echo
+ echo "*************************************************************"
+ echo "It seems you are not running a x86_64 system. Yubico"
+ echo "Authenticator only supports x86_64 architecture."
+ echo "*************************************************************"
+ echo
+ exit 1
+fi
+
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Stripping the binary makes it not work
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs chmod 755 || true
+
+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
# Copy program license into the package
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README.adoc $PKG/usr/doc/$PRGNAM-$VERSION/
+install -m 644 README.adoc $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Copy the slack-desc into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE