forked from slackroll/slackroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slackroll.slackbuild
executable file
·63 lines (53 loc) · 1.63 KB
/
slackroll.slackbuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
# Exit on errors.
set -e
# Set sane umask.
umask 022
# Set language (this helps sometimes).
export LANG=C
# Initial variables.
NAME=slackroll
VERSION=v`grep '^slackroll_version' slackroll | cut -d' ' -f3`
ARCH=noarch
BUILD=${BUILD:-1}
OUT=${TMP:-/tmp}
PKG=$OUT/package-$NAME
# Clear sandbox directory.
rm -rf $PKG
mkdir -p $PKG
# Copy files to destination directories.
mkdir -p $PKG/usr/sbin
mkdir -p $PKG/usr/man/man1
mkdir -p $PKG/usr/doc/$NAME-$VERSION
mkdir -p $PKG/usr/doc/$NAME-$VERSION/helpfiles
mkdir -p $PKG/var/slackroll
install -m 755 slackroll $PKG/usr/sbin
install -m 644 COPYING $PKG/usr/doc/$NAME-$VERSION
install -m 644 helpfiles/* $PKG/usr/doc/$NAME-$VERSION/helpfiles
# Generate manpage.
asciidoc -b docbook -d manpage manpage.txt
xmlto man manpage.xml
gzip -9 slackroll.1
install -m 644 slackroll.1.gz $PKG/usr/man/man1
rm manpage.xml
rm slackroll.1.gz
# Add package description.
mkdir -p $PKG/install
cat >$PKG/install/slack-desc <<EOF
|-----handy-ruler------------------------------------------------------|
slackroll: slackroll (Package or upgrade manager for Slackware Linux)
slackroll:
slackroll: slackroll is a package or upgrade manager for Slackware Linux. It
slackroll: lets you work with official mirrors and third-party repositories,
slackroll: easing the task of upgrading or installing packages, and letting you
slackroll: detect which packages have been added to or removed from the
slackroll: Slackware tree.
slackroll:
slackroll: https://rg3.github.io/slackroll/
slackroll:
EOF
# Create package.
cd $PKG
makepkg -l y -c n $OUT/$NAME-$VERSION-$ARCH-$BUILD.tgz
# Clean up the sandbox directory.
rm -rf $PKG