diff --git a/e/emacs/SlackBuild b/e/emacs/SlackBuild index 23449388..b97b66c1 100755 --- a/e/emacs/SlackBuild +++ b/e/emacs/SlackBuild @@ -51,6 +51,8 @@ fi VERSION=${VERSION:-latest} UI=${UI:-pgtk} # pgtk or x11 or nox +PREFIX=${PREFIX:-/usr} + REPOSITORY=/home/installs/SlackBuilds/_repositories/$PKGNAM rm -rf "$PKG" @@ -131,13 +133,13 @@ GWH_OPTIONS="--with-tree-sitter \ --enable-link-time-optimization \ --with-native-compilation=aot" -CONFIGURE_OPTIONS="--prefix=/usr \ +CONFIGURE_OPTIONS="--prefix=${PREFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --program-prefix="" \ --program-suffix="" \ - --mandir=/usr/man \ - --infodir=/usr/info \ + --mandir=${PREFIX}/man \ + --infodir=${PREFIX}/info \ --without-gconf \ --without-gsettings \ --without-android \ @@ -181,35 +183,35 @@ if [ -d "$PKG/var/games/emacs" ]; then fi # This avoids a collision with Exuberant Ctags... -mv "$PKG/usr/bin/ctags" "$PKG/usr/bin/ctags-emacs" -if [ -r "$PKG/usr/man/man1/ctags.1" ]; then - mv "$PKG/usr/man/man1/ctags.1" "$PKG/usr/man/man1/ctags-emacs.1" -elif [ -r "$PKG/usr/man/man1/ctags.1.gz" ]; then - mv "$PKG/usr/man/man1/ctags.1.gz" "$PKG/usr/man/man1/ctags-emacs.1.gz" +mv "$PKG${PREFIX}/bin/ctags" "$PKG${PREFIX}/bin/ctags-emacs" +if [ -r "$PKG${PREFIX}/man/man1/ctags.1" ]; then + mv "$PKG${PREFIX}/man/man1/ctags.1" "$PKG${PREFIX}/man/man1/ctags-emacs.1" +elif [ -r "$PKG${PREFIX}/man/man1/ctags.1.gz" ]; then + mv "$PKG${PREFIX}/man/man1/ctags.1.gz" "$PKG${PREFIX}/man/man1/ctags-emacs.1.gz" fi find -0 "$PKG" | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -( cd "$PKG/usr/man" || exit 1 +( cd "$PKG${PREFIX}/man" || exit 1 find . -type f -exec gzip -9 {} \+ for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) -( cd "$PKG/usr/info" || exit 1 +( cd "$PKG${PREFIX}/info" || exit 1 rm -f dir gzip -9 ./* ) -mkdir -p "$PKG/usr/doc/$PKGNAM" +mkdir -p "$PKG${PREFIX}/doc/$PKGNAM" cp -a \ AUTHORS* COPYING* INSTALL* README* ChangeLog* \ - "$PKG/usr/doc/$PKGNAM" + "$PKG${PREFIX}/doc/$PKGNAM" # Link the latest NEWS file: -( cd "$PKG/usr/doc/$PKGNAM" || exit 1 - if [ -r "$PKG/usr/share/emacs/$VERSION/etc/NEWS" ]; then - ln -sf "/usr/share/emacs/$VERSION/etc/NEWS" . +( cd "$PKG${PREFIX}/doc/$PKGNAM" || exit 1 + if [ -r "$PKG${PREFIX}/share/emacs/$VERSION/etc/NEWS" ]; then + ln -sf "${PREFIX}/share/emacs/$VERSION/etc/NEWS" . fi ) diff --git a/l/basu/SlackBuild b/l/basu/SlackBuild index fcb73be8..6afdcb74 100755 --- a/l/basu/SlackBuild +++ b/l/basu/SlackBuild @@ -36,7 +36,7 @@ cd $TMP/$PRGNAM/ [ "x$VERSION" == "xtrunk" ] && VERSION="git_r$( cd $REPOSITORY && git rev-list --count HEAD )" || git checkout $VERSION meson build/ -meson configure --prefix /usr --mandir /usr/man/ build/ +meson configure --prefix ${PREFIX} --mandir ${PREFIX}/man/ build/ ninja -C build/ cd build/ meson install --destdir=$PKG diff --git a/l/fmt/SlackBuild b/l/fmt/SlackBuild index a52cbc72..180705a2 100755 --- a/l/fmt/SlackBuild +++ b/l/fmt/SlackBuild @@ -55,7 +55,7 @@ chown -R root:root * find $PKG -name \.git\* -exec rm -fr {} \; -[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; +[ -d $PKG${PREFIX}/man ] && find $PKG${PREFIX}/man -type f -name "*.?" -exec gzip -9f {} \; # # Strip binaries # cd $PKG diff --git a/l/hinnant-date/SlackBuild b/l/hinnant-date/SlackBuild index 45f425a0..ace94b73 100755 --- a/l/hinnant-date/SlackBuild +++ b/l/hinnant-date/SlackBuild @@ -20,8 +20,6 @@ REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM PREFIX=/usr -SLCKFLAGS=" -O " - # nettoyage préalable rm -fr $PKG $TMP/$PRGNAM @@ -62,7 +60,7 @@ chown -R root:root * find $PKG -name \.git\* -exec rm -fr {} \; -[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; +[ -d $PKG${PREFIX}/man ] && find $PKG${PREFIX}/man -type f -name "*.?" -exec gzip -9f {} \; # # Strip binaries # cd $PKG diff --git a/l/raylib/SlackBuild b/l/raylib/SlackBuild index 83537cf0..93ce0af5 100755 --- a/l/raylib/SlackBuild +++ b/l/raylib/SlackBuild @@ -18,9 +18,6 @@ ARCH=$(uname -m) REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM PREFIX=/usr -EMACS=$(basename $(ls /usr/bin/emacs-2*)) -EMACS_VERSION=$(echo "$EMACS" | grep -o "\-[0-9\.]*\-" | tr -d - | head -n1) - # nettoyage préalable rm -fr $PKG $TMP/$PRGNAM diff --git a/l/sdl12-compat/SlackBuild b/l/sdl12-compat/SlackBuild index 1f48ebff..fe3a4ed3 100755 --- a/l/sdl12-compat/SlackBuild +++ b/l/sdl12-compat/SlackBuild @@ -64,7 +64,7 @@ chown -R root:root ./* find . -name \.git\* -exec rm -fr {} \; -[ -d ./usr/man ] && find ./usr/man -type f -name "*.?" -exec gzip -9f {} \; +[ -d .${PREFIX}/man ] && find .${PREFIX}/man -type f -name "*.?" -exec gzip -9f {} \; # # Strip binaries # cd $PKG diff --git a/l/seatd/SlackBuild b/l/seatd/SlackBuild index 9ebb6e61..2c2b1fdf 100755 --- a/l/seatd/SlackBuild +++ b/l/seatd/SlackBuild @@ -34,7 +34,7 @@ cd $TMP/$PRGNAM/ [ "x$VERSION" == "x" ] && VERSION=trunk [ "x$VERSION" == "xtrunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" || git checkout $VERSION -meson setup --prefix /usr --mandir /usr/man/ build/ +meson setup --prefix ${PREFIX} --mandir ${PREFIX}/man/ build/ ninja -C build/ cd build/ meson install --destdir=$PKG diff --git a/l/spdlog/SlackBuild b/l/spdlog/SlackBuild index 1d82de8e..66d08b2e 100755 --- a/l/spdlog/SlackBuild +++ b/l/spdlog/SlackBuild @@ -56,7 +56,7 @@ chown -R root:root * find $PKG -name \.git\* -exec rm -fr {} \; -[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; +[ -d $PKG${PREFIX}/man ] && find $PKG${PREFIX}/man -type f -name "*.?" -exec gzip -9f {} \; # # Strip binaries # cd $PKG diff --git a/y/FlashBack/SlackBuild b/y/FlashBack/SlackBuild index d505a2d2..9c174630 100755 --- a/y/FlashBack/SlackBuild +++ b/y/FlashBack/SlackBuild @@ -10,6 +10,7 @@ VERSION=${VERSION:-1.0} ARCH=${ARCH:-${ARCH:-dosbox}} BUILD=${BUILD:-1} +PREFIX=${PREFIX:-/usr} PKG=$TMP/pkg-$PRGNAM @@ -18,15 +19,15 @@ rm -rf $PKG $TMP/${PRGNAM}-${VERSION} mkdir -p $TMP cd $TMP -mkdir -p $PKG/usr/games/ $PKG/usr/share/games/ -cd $PKG/usr/share/games +mkdir -p $PKG${PREFIX}/games/ $PKG${PREFIX}/share/games/ +cd $PKG${PREFIX}/share/games # [ ! -e $CWD/flashback-x86_64.tar.gz ] & wget -c -O $CWD/flashback-x86_64.tar.gz https://lutris.net/files/games/flashback/flashback-x86_64.tar.gz # tar xvf $CWD/flashback-x86_64.tar.gz # mv flashback FlashBack # https://cors.archive.org/cors/msdos_Flashback_-_The_Quest_for_Identity_1993/Flashback_-_The_Quest_for_Identity_1993.zip tar xf $CWD/FlashBack.tar.bz2 cd FlashBack -chmod a+w /usr/share/games/FlashBack/DATA/* +chmod a+w ${PREFIX}/share/games/FlashBack/DATA/* cat < dosbox.config [sdl] @@ -137,23 +138,23 @@ dpmi=true [autoexec] # Lines in this section will be run at startup. -mount f /usr/share/games/FlashBack +mount f ${PREFIX}/share/games/FlashBack f: FB.EXE exit EOF -cd $PKG/usr/games/ +cd $PKG${PREFIX}/games/ cat < flashback.sh #!/bin/bash -dosbox -conf /usr/share/games/FlashBack/dosbox.config \$* +dosbox -conf ${PREFIX}/share/games/FlashBack/dosbox.config \$* EOF chmod +x flashback.sh chown -R root:root $PKG/* -chmod -R go-w $PKG/usr/share/games/FlashBack/ -chmod 666 $PKG/usr/share/games/FlashBack/DATA/* -chmod a+w $PKG/usr/share/games/FlashBack/DATA/{GLOBAL.FIB,DATA/FB_TXT.FNT,DATA/LOGOS.POL} +chmod -R go-w $PKG${PREFIX}/share/games/FlashBack/ +chmod 666 $PKG${PREFIX}/share/games/FlashBack/DATA/* +chmod a+w $PKG${PREFIX}/share/games/FlashBack/DATA/{GLOBAL.FIB,DATA/FB_TXT.FNT,DATA/LOGOS.POL} mkdir -p $PKG/install @@ -175,7 +176,7 @@ ${PRGNAM}: ${PRGNAM}: ${PRGNAM}: ${PRGNAM}: -${PRGNAM}: see /usr/doc/${PRGNAM}-${VERSION} for more. +${PRGNAM}: see ${PREFIX}/doc/${PRGNAM}-${VERSION} for more. ${PRGNAM}: EOF diff --git a/y/cboard/SlackBuild b/y/cboard/SlackBuild index 502af8e0..c89f7a9e 100755 --- a/y/cboard/SlackBuild +++ b/y/cboard/SlackBuild @@ -18,7 +18,7 @@ OUTPUT=/tmp REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM -PREFIX=/usr +PREFIX=${PREFIX:-/usr} # Cleaning rm -fr $PKG $TMP/$PRGNAM diff --git a/y/eliot/SlackBuild b/y/eliot/SlackBuild index 67ed2ed4..52691ed9 100755 --- a/y/eliot/SlackBuild +++ b/y/eliot/SlackBuild @@ -7,6 +7,8 @@ VERSION=${VERSION:-latest} BUILD=${BUILD:-3} TAG=${TAG:-gwh} +PREFIX=${PREFIX:-/usr} + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; @@ -63,10 +65,10 @@ CFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ - --prefix=/usr \ + --prefix=${PREFIX} \ --sysconfdir=/etc \ - --mandir=/usr/man \ - --libdir=/usr/lib$(uname -m | grep -o 64) \ + --mandir=${PREFIX}/man \ + --libdir=${PREFIX}/lib$(uname -m | grep -o 64) \ --build=$ARCH-slackware-linux \ --host=$ARCH-slackware-linux @@ -76,12 +78,12 @@ 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 -# 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 +# find $PKG${PREFIX}/man -type f -exec gzip -9 {} \; +# for i in $( find $PKG${PREFIX}/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -mkdir -p $PKG/usr/doc/$PRGNAM -cp -R AUTHORS ChangeLog COPYING* INSTALL LGPL-2.0.txt NEWS README THANKS TODO $PKG/usr/doc/$PRGNAM -cat < $PKG/usr/doc/$PRGNAM/gen-ODS9-dawg.bash +mkdir -p $PKG${PREFIX}/doc/$PRGNAM +cp -R AUTHORS ChangeLog COPYING* INSTALL LGPL-2.0.txt NEWS README THANKS TODO $PKG${PREFIX}/doc/$PRGNAM +cat < $PKG${PREFIX}/doc/$PRGNAM/gen-ODS9-dawg.bash #!/bin/bash if [ \$UID = 0 ]; then @@ -101,14 +103,14 @@ done echo echo "Generating dictionary…" -/usr/bin/compdic -d 'ODS 9.0' -l /tmp/letters.txt -i /tmp/ods9.txt -o /tmp/ods9.dawg +${PREFIX}/bin/compdic -d 'ODS 9.0' -l /tmp/letters.txt -i /tmp/ods9.txt -o /tmp/ods9.dawg echo "Installing dictionary into ~/.config/eliot/ods9.dawg…" mkdir -p ~/.config/eliot/ [ -e ~/.config/eliot/ods9.dawg ] && mv ~/.config/eliot/ods9.dawg ~/.config/eliot/ods9.dawg.orig cp /tmp/ods9.dawg ~/.config/eliot/ods9.dawg EOF -chmod +x $PKG/usr/doc/$PRGNAM/gen-ODS9-dawg.bash +chmod +x $PKG${PREFIX}/doc/$PRGNAM/gen-ODS9-dawg.bash mkdir -p $PKG/install cat < $PKG/install/slack-desc @@ -128,7 +130,7 @@ $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: -$PRGNAM: (see helper script /usr/doc/$PRGNAM/gen-ODS9-dawg.bash) +$PRGNAM: (see helper script ${PREFIX}/doc/$PRGNAM/gen-ODS9-dawg.bash) $PRGNAM: $PRGNAM: https://www.nongnu.org/eliot/fr/index.html EOF