(WIP) make PREFIX adjustable
This commit is contained in:
parent
406fa29927
commit
07785a952d
11 changed files with 48 additions and 48 deletions
|
@ -51,6 +51,8 @@ fi
|
||||||
VERSION=${VERSION:-latest}
|
VERSION=${VERSION:-latest}
|
||||||
UI=${UI:-pgtk} # pgtk or x11 or nox
|
UI=${UI:-pgtk} # pgtk or x11 or nox
|
||||||
|
|
||||||
|
PREFIX=${PREFIX:-/usr}
|
||||||
|
|
||||||
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PKGNAM
|
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PKGNAM
|
||||||
|
|
||||||
rm -rf "$PKG"
|
rm -rf "$PKG"
|
||||||
|
@ -131,13 +133,13 @@ GWH_OPTIONS="--with-tree-sitter \
|
||||||
--enable-link-time-optimization \
|
--enable-link-time-optimization \
|
||||||
--with-native-compilation=aot"
|
--with-native-compilation=aot"
|
||||||
|
|
||||||
CONFIGURE_OPTIONS="--prefix=/usr \
|
CONFIGURE_OPTIONS="--prefix=${PREFIX} \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--program-prefix="" \
|
--program-prefix="" \
|
||||||
--program-suffix="" \
|
--program-suffix="" \
|
||||||
--mandir=/usr/man \
|
--mandir=${PREFIX}/man \
|
||||||
--infodir=/usr/info \
|
--infodir=${PREFIX}/info \
|
||||||
--without-gconf \
|
--without-gconf \
|
||||||
--without-gsettings \
|
--without-gsettings \
|
||||||
--without-android \
|
--without-android \
|
||||||
|
@ -181,35 +183,35 @@ if [ -d "$PKG/var/games/emacs" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This avoids a collision with Exuberant Ctags...
|
# This avoids a collision with Exuberant Ctags...
|
||||||
mv "$PKG/usr/bin/ctags" "$PKG/usr/bin/ctags-emacs"
|
mv "$PKG${PREFIX}/bin/ctags" "$PKG${PREFIX}/bin/ctags-emacs"
|
||||||
if [ -r "$PKG/usr/man/man1/ctags.1" ]; then
|
if [ -r "$PKG${PREFIX}/man/man1/ctags.1" ]; then
|
||||||
mv "$PKG/usr/man/man1/ctags.1" "$PKG/usr/man/man1/ctags-emacs.1"
|
mv "$PKG${PREFIX}/man/man1/ctags.1" "$PKG${PREFIX}/man/man1/ctags-emacs.1"
|
||||||
elif [ -r "$PKG/usr/man/man1/ctags.1.gz" ]; then
|
elif [ -r "$PKG${PREFIX}/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}/man/man1/ctags.1.gz" "$PKG${PREFIX}/man/man1/ctags-emacs.1.gz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find -0 "$PKG" | xargs file | grep -e "executable" -e "shared object" \
|
find -0 "$PKG" | xargs file | grep -e "executable" -e "shared object" \
|
||||||
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
| 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 {} \+
|
find . -type f -exec gzip -9 {} \+
|
||||||
for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
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
|
rm -f dir
|
||||||
gzip -9 ./*
|
gzip -9 ./*
|
||||||
)
|
)
|
||||||
|
|
||||||
mkdir -p "$PKG/usr/doc/$PKGNAM"
|
mkdir -p "$PKG${PREFIX}/doc/$PKGNAM"
|
||||||
cp -a \
|
cp -a \
|
||||||
AUTHORS* COPYING* INSTALL* README* ChangeLog* \
|
AUTHORS* COPYING* INSTALL* README* ChangeLog* \
|
||||||
"$PKG/usr/doc/$PKGNAM"
|
"$PKG${PREFIX}/doc/$PKGNAM"
|
||||||
|
|
||||||
# Link the latest NEWS file:
|
# Link the latest NEWS file:
|
||||||
( cd "$PKG/usr/doc/$PKGNAM" || exit 1
|
( cd "$PKG${PREFIX}/doc/$PKGNAM" || exit 1
|
||||||
if [ -r "$PKG/usr/share/emacs/$VERSION/etc/NEWS" ]; then
|
if [ -r "$PKG${PREFIX}/share/emacs/$VERSION/etc/NEWS" ]; then
|
||||||
ln -sf "/usr/share/emacs/$VERSION/etc/NEWS" .
|
ln -sf "${PREFIX}/share/emacs/$VERSION/etc/NEWS" .
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ cd $TMP/$PRGNAM/
|
||||||
[ "x$VERSION" == "xtrunk" ] && VERSION="git_r$( cd $REPOSITORY && git rev-list --count HEAD )" || git checkout $VERSION
|
[ "x$VERSION" == "xtrunk" ] && VERSION="git_r$( cd $REPOSITORY && git rev-list --count HEAD )" || git checkout $VERSION
|
||||||
|
|
||||||
meson build/
|
meson build/
|
||||||
meson configure --prefix /usr --mandir /usr/man/ build/
|
meson configure --prefix ${PREFIX} --mandir ${PREFIX}/man/ build/
|
||||||
ninja -C build/
|
ninja -C build/
|
||||||
cd build/
|
cd build/
|
||||||
meson install --destdir=$PKG
|
meson install --destdir=$PKG
|
||||||
|
|
|
@ -55,7 +55,7 @@ chown -R root:root *
|
||||||
|
|
||||||
find $PKG -name \.git\* -exec rm -fr {} \;
|
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
|
# # Strip binaries
|
||||||
# cd $PKG
|
# cd $PKG
|
||||||
|
|
|
@ -20,8 +20,6 @@ REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM
|
||||||
|
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
|
||||||
SLCKFLAGS=" -O "
|
|
||||||
|
|
||||||
# nettoyage préalable
|
# nettoyage préalable
|
||||||
rm -fr $PKG $TMP/$PRGNAM
|
rm -fr $PKG $TMP/$PRGNAM
|
||||||
|
|
||||||
|
@ -62,7 +60,7 @@ chown -R root:root *
|
||||||
|
|
||||||
find $PKG -name \.git\* -exec rm -fr {} \;
|
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
|
# # Strip binaries
|
||||||
# cd $PKG
|
# cd $PKG
|
||||||
|
|
|
@ -18,9 +18,6 @@ ARCH=$(uname -m)
|
||||||
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM
|
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
|
||||||
EMACS=$(basename $(ls /usr/bin/emacs-2*))
|
|
||||||
EMACS_VERSION=$(echo "$EMACS" | grep -o "\-[0-9\.]*\-" | tr -d - | head -n1)
|
|
||||||
|
|
||||||
# nettoyage préalable
|
# nettoyage préalable
|
||||||
rm -fr $PKG $TMP/$PRGNAM
|
rm -fr $PKG $TMP/$PRGNAM
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ chown -R root:root ./*
|
||||||
|
|
||||||
find . -name \.git\* -exec rm -fr {} \;
|
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
|
# # Strip binaries
|
||||||
# cd $PKG
|
# cd $PKG
|
||||||
|
|
|
@ -34,7 +34,7 @@ cd $TMP/$PRGNAM/
|
||||||
[ "x$VERSION" == "x" ] && VERSION=trunk
|
[ "x$VERSION" == "x" ] && VERSION=trunk
|
||||||
[ "x$VERSION" == "xtrunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" || git checkout $VERSION
|
[ "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/
|
ninja -C build/
|
||||||
cd build/
|
cd build/
|
||||||
meson install --destdir=$PKG
|
meson install --destdir=$PKG
|
||||||
|
|
|
@ -56,7 +56,7 @@ chown -R root:root *
|
||||||
|
|
||||||
find $PKG -name \.git\* -exec rm -fr {} \;
|
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
|
# # Strip binaries
|
||||||
# cd $PKG
|
# cd $PKG
|
||||||
|
|
|
@ -10,6 +10,7 @@ VERSION=${VERSION:-1.0}
|
||||||
ARCH=${ARCH:-${ARCH:-dosbox}}
|
ARCH=${ARCH:-${ARCH:-dosbox}}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
|
|
||||||
|
PREFIX=${PREFIX:-/usr}
|
||||||
|
|
||||||
PKG=$TMP/pkg-$PRGNAM
|
PKG=$TMP/pkg-$PRGNAM
|
||||||
|
|
||||||
|
@ -18,15 +19,15 @@ rm -rf $PKG $TMP/${PRGNAM}-${VERSION}
|
||||||
mkdir -p $TMP
|
mkdir -p $TMP
|
||||||
cd $TMP
|
cd $TMP
|
||||||
|
|
||||||
mkdir -p $PKG/usr/games/ $PKG/usr/share/games/
|
mkdir -p $PKG${PREFIX}/games/ $PKG${PREFIX}/share/games/
|
||||||
cd $PKG/usr/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
|
# [ ! -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
|
# tar xvf $CWD/flashback-x86_64.tar.gz
|
||||||
# mv flashback FlashBack
|
# mv flashback FlashBack
|
||||||
# https://cors.archive.org/cors/msdos_Flashback_-_The_Quest_for_Identity_1993/Flashback_-_The_Quest_for_Identity_1993.zip
|
# 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
|
tar xf $CWD/FlashBack.tar.bz2
|
||||||
cd FlashBack
|
cd FlashBack
|
||||||
chmod a+w /usr/share/games/FlashBack/DATA/*
|
chmod a+w ${PREFIX}/share/games/FlashBack/DATA/*
|
||||||
|
|
||||||
cat <<EOF > dosbox.config
|
cat <<EOF > dosbox.config
|
||||||
[sdl]
|
[sdl]
|
||||||
|
@ -137,23 +138,23 @@ dpmi=true
|
||||||
|
|
||||||
[autoexec]
|
[autoexec]
|
||||||
# Lines in this section will be run at startup.
|
# Lines in this section will be run at startup.
|
||||||
mount f /usr/share/games/FlashBack
|
mount f ${PREFIX}/share/games/FlashBack
|
||||||
f:
|
f:
|
||||||
FB.EXE
|
FB.EXE
|
||||||
exit
|
exit
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cd $PKG/usr/games/
|
cd $PKG${PREFIX}/games/
|
||||||
cat <<EOF > flashback.sh
|
cat <<EOF > flashback.sh
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
dosbox -conf /usr/share/games/FlashBack/dosbox.config \$*
|
dosbox -conf ${PREFIX}/share/games/FlashBack/dosbox.config \$*
|
||||||
EOF
|
EOF
|
||||||
chmod +x flashback.sh
|
chmod +x flashback.sh
|
||||||
|
|
||||||
chown -R root:root $PKG/*
|
chown -R root:root $PKG/*
|
||||||
chmod -R go-w $PKG/usr/share/games/FlashBack/
|
chmod -R go-w $PKG${PREFIX}/share/games/FlashBack/
|
||||||
chmod 666 $PKG/usr/share/games/FlashBack/DATA/*
|
chmod 666 $PKG${PREFIX}/share/games/FlashBack/DATA/*
|
||||||
chmod a+w $PKG/usr/share/games/FlashBack/DATA/{GLOBAL.FIB,DATA/FB_TXT.FNT,DATA/LOGOS.POL}
|
chmod a+w $PKG${PREFIX}/share/games/FlashBack/DATA/{GLOBAL.FIB,DATA/FB_TXT.FNT,DATA/LOGOS.POL}
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
|
|
||||||
|
@ -175,7 +176,7 @@ ${PRGNAM}:
|
||||||
${PRGNAM}:
|
${PRGNAM}:
|
||||||
${PRGNAM}:
|
${PRGNAM}:
|
||||||
${PRGNAM}:
|
${PRGNAM}:
|
||||||
${PRGNAM}: see /usr/doc/${PRGNAM}-${VERSION} for more.
|
${PRGNAM}: see ${PREFIX}/doc/${PRGNAM}-${VERSION} for more.
|
||||||
${PRGNAM}:
|
${PRGNAM}:
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ OUTPUT=/tmp
|
||||||
|
|
||||||
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM
|
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM
|
||||||
|
|
||||||
PREFIX=/usr
|
PREFIX=${PREFIX:-/usr}
|
||||||
|
|
||||||
# Cleaning
|
# Cleaning
|
||||||
rm -fr $PKG $TMP/$PRGNAM
|
rm -fr $PKG $TMP/$PRGNAM
|
||||||
|
|
|
@ -7,6 +7,8 @@ VERSION=${VERSION:-latest}
|
||||||
BUILD=${BUILD:-3}
|
BUILD=${BUILD:-3}
|
||||||
TAG=${TAG:-gwh}
|
TAG=${TAG:-gwh}
|
||||||
|
|
||||||
|
PREFIX=${PREFIX:-/usr}
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
if [ -z "$ARCH" ]; then
|
||||||
case "$( uname -m )" in
|
case "$( uname -m )" in
|
||||||
i?86) ARCH=i486 ;;
|
i?86) ARCH=i486 ;;
|
||||||
|
@ -63,10 +65,10 @@ CFLAGS="$SLKCFLAGS" \
|
||||||
CFLAGS="$SLKCFLAGS" \
|
CFLAGS="$SLKCFLAGS" \
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
CXXFLAGS="$SLKCFLAGS" \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=${PREFIX} \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--mandir=/usr/man \
|
--mandir=${PREFIX}/man \
|
||||||
--libdir=/usr/lib$(uname -m | grep -o 64) \
|
--libdir=${PREFIX}/lib$(uname -m | grep -o 64) \
|
||||||
--build=$ARCH-slackware-linux \
|
--build=$ARCH-slackware-linux \
|
||||||
--host=$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 \
|
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
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||||
|
|
||||||
# find $PKG/usr/man -type f -exec gzip -9 {} \;
|
# find $PKG${PREFIX}/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
|
# 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
|
mkdir -p $PKG${PREFIX}/doc/$PRGNAM
|
||||||
cp -R AUTHORS ChangeLog COPYING* INSTALL LGPL-2.0.txt NEWS README THANKS TODO $PKG/usr/doc/$PRGNAM
|
cp -R AUTHORS ChangeLog COPYING* INSTALL LGPL-2.0.txt NEWS README THANKS TODO $PKG${PREFIX}/doc/$PRGNAM
|
||||||
cat <<EOF > $PKG/usr/doc/$PRGNAM/gen-ODS9-dawg.bash
|
cat <<EOF > $PKG${PREFIX}/doc/$PRGNAM/gen-ODS9-dawg.bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ \$UID = 0 ]; then
|
if [ \$UID = 0 ]; then
|
||||||
|
@ -101,14 +103,14 @@ done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "Generating dictionary…"
|
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…"
|
echo "Installing dictionary into ~/.config/eliot/ods9.dawg…"
|
||||||
mkdir -p ~/.config/eliot/
|
mkdir -p ~/.config/eliot/
|
||||||
[ -e ~/.config/eliot/ods9.dawg ] && mv ~/.config/eliot/ods9.dawg ~/.config/eliot/ods9.dawg.orig
|
[ -e ~/.config/eliot/ods9.dawg ] && mv ~/.config/eliot/ods9.dawg ~/.config/eliot/ods9.dawg.orig
|
||||||
cp /tmp/ods9.dawg ~/.config/eliot/ods9.dawg
|
cp /tmp/ods9.dawg ~/.config/eliot/ods9.dawg
|
||||||
EOF
|
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
|
mkdir -p $PKG/install
|
||||||
cat <<EOF > $PKG/install/slack-desc
|
cat <<EOF > $PKG/install/slack-desc
|
||||||
|
@ -128,7 +130,7 @@ $PRGNAM:
|
||||||
$PRGNAM:
|
$PRGNAM:
|
||||||
$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:
|
||||||
$PRGNAM: https://www.nongnu.org/eliot/fr/index.html
|
$PRGNAM: https://www.nongnu.org/eliot/fr/index.html
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue