Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
Gwenhael Le Moine 2020-09-02 11:46:52 +02:00
commit 4e23d6c792
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
3 changed files with 216 additions and 1 deletions

82
ap/ion/SlackBuild Executable file
View file

@ -0,0 +1,82 @@
#!/bin/sh
# variables
VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")}
BUILD=${BUILD:-1}
TAG=gwh
TMP=/tmp/$TAG
CWD=$(pwd)
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
ARCH=${ARCH:-$(uname -m)}
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM}
PREFIX=${PREFIX:-/usr}
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
# mise en place
cd $TMP
[ ! -e $REPOSITORY ] && git clone https://gitlab.redox-os.org/redox-os/ion/ $REPOSITORY
( cd $REPOSITORY && git pull )
VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
cp -R $REPOSITORY $TMP/
cd $TMP/$PRGNAM
cargo build --release
mkdir -p $PKG$PREFIX/bin
cp target/release/$PRGNAM $PKG$PREFIX/bin/
chmod 755 $PKG$PREFIX/bin/*
# move doc/ to the appropriate location
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp LICENCE* *.md $PKG$PREFIX/doc/$PRGNAM
# correction
cd $PKG
chown -R root:root *
find $PKG$PREFIX/man -type f -not -name \*.gz -exec gzip -9 {} \;
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/doinst.sh
#!/bin/sh
grep -q ion /etc/shells || echo /bin/ion >> /etc/shells;
EOF
cat <<EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
$PRGNAM: $PRGNAM (The Ion Shell. Compatible with Redox and Linux.)
$PRGNAM:
$PRGNAM: Ion is a modern system shell that features a simple, yet powerful,
$PRGNAM: syntax. It is written entirely in Rust, which greatly increases the
$PRGNAM: overall quality and security of the shell. It also offers a level of
$PRGNAM: performance that exceeds that of Dash, when taking advantage of Ion's
$PRGNAM: features. While it is developed alongside, and primarily for, RedoxOS,
$PRGNAM: it is a fully capable on other *nix platforms.
$PRGNAM:
$PRGNAM:
$PRGNAM: https://gitlab.redox-os.org/redox-os/ion/
EOF
# empaquetage
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz

View file

@ -28,7 +28,7 @@ start() {
stop() { stop() {
echo -n "Shutting down $DAEMON..." echo -n "Shutting down $DAEMON..."
/usr/bin/kill $(cat $PIDFILE) && rm $PIDFILE kill $(cat $PIDFILE) && rm $PIDFILE
RETVAL=$? RETVAL=$?
sleep 1 sleep 1
status status

133
xap/LDCad/SlackBuild Executable file
View file

@ -0,0 +1,133 @@
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=${VERSION:-1.6d}
ARCH=$(uname -m)
BUILD=${BUILD:-1}
TAG=${TAG:-gwh}
TMP=${TMP:-/tmp/$TAG}
PKG=$TMP/pkg-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
TARVERSION=$(echo $VERSION | tr . -)
[ ! -e $CWD/LDCad-$TARVERSION-Linux.tar.bz2 ] && wget -c -O $CWD/LDCad-$TARVERSION-Linux.tar.bz2 http://www.melkert.net/action/download/LDCad-$TARVERSION-Linux.tar.bz2
[ ! -e $CWD/complete.zip ] && wget -c -O $CWD/complete.zip http://www.ldraw.org/library/updates/complete.zip
rm -fr $PKG $TMP/LDCad-$TARVERSION-Linux
mkdir -p $PKG $TMP
cd $TMP
tar xvf $CWD/LDCad-$TARVERSION-Linux.tar.bz2
cd LDCad-$TARVERSION-Linux
mkdir -p $PKG/usr/bin
if [ -e "LDCad" ]
then
appSrcExe="LDCad"
else
if [ `getconf LONG_BIT` = "64" ]
then
appSrcExe="LDCad64"
else
appSrcExe="LDCad32"
fi
fi
cp -v $appSrcExe $PKG/usr/bin/LDCad
mkdir -p $PKG/usr/share/LDCad
mkdir -p $PKG/usr/share/LDCad/seeds
cp -v seeds/*.sf $PKG/usr/share/LDCad/seeds
cp -vr resources $PKG/usr/share/LDCad
cp $CWD/complete.zip $PKG/usr/share/LDCad
mkdir -p $PKG/usr/doc/LDCad
cp -vr docs/* $PKG/usr/doc/LDCad
mkdir -p $PKG/usr/share/mime
cat <<EOF > $PKG/usr/share/mime/ldraw.xml
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<mime-info xmlns=\"http://www.freedesktop.org/standards/shared-mime-info\">
<mime-type type=\"application/x-ldraw\">
<comment>LDraw Model</comment>
<glob pattern=\"*.ldr\"/>
<glob pattern=\"*.LDR\"/>
</mime-type>
<mime-type type=\"application/x-multipart-ldraw\">
<comment>LDraw Model</comment>
<glob pattern=\"*.mpd\"/>
<glob pattern=\"*.MPD\"/>
</mime-type>
</mime-info>
EOF
mkdir -p $PKG/usr/share/applications/
cat <<EOF > $PKG/usr/share/applications/LDCad.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Version=$VERSION
Name=LDCad
GenericName=LDraw model editor
Comment=LDCad can be used to edit all kinds of LDraw (virtual LEGO(r)) models.
Icon=/usr/share/LDCad/resources/LDCad-128x128.png
Exec=/usr/bin/LDCad
Terminal=false
MimeType=application/x-ldraw;application/x-multipart-ldraw
Categories=Graphics
EOF
mkdir -p $PKG/etc
cat <<EOF > $PKG/etc/LDCad.cfg
[paths]
resourcesDir=/usr/share/LDCad/resources
seedsDir=/usr/share/LDCad/seeds
logDir=<userAppDataDir>/.LDCad/logs
cfgDir=<userAppDataDir>/.LDCad/config
guiDir=<userAppDataDir>/.LDCad/gui
colorBinDir=<userAppDataDir>/.LDCad/colorBin
partBinDir=<userAppDataDir>/.LDCad/partBin
examplesDir=<userAppDataDir>/.LDCad/examples
templatesDir=<userAppDataDir>/.LDCad/templates
donorsDir=<userAppDataDir>/.LDCad/donors
shadowDir=<userAppDataDir>/.LDCad/shadow
scriptsDir=<userAppDataDir>/.LDCad/scripts
povCfgDir=<userAppDataDir>/.LDCad/povray
EOF
mkdir -p $PKG/install/
cat <<EOF > $PKG/install/doinst.sh
#!/bin/sh
update-mime-database /usr/share/mime
update-desktop-database
EOF
cat <<EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
${PRGNAM}: ${PRGNAM} (LEGO™ CAD program)
${PRGNAM}:
${PRGNAM}: LDCad is a multiplatform LDraw (virtual LEGO) editor that lets you
${PRGNAM}: edit LDraw model documents in real-time.
${PRGNAM}:
${PRGNAM}: For those that are new to LDraw, it's highly recommended that you take
${PRGNAM}: a close look to the project's home site LDraw.org and it's forum.
${PRGNAM}:
${PRGNAM}:
${PRGNAM}: LDraw library is installed in /usr/share/LDCad/
${PRGNAM}:
EOF
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz