Check-in [516e8e6dd7]
Overview
SHA1:516e8e6dd792c70fa89557a461089ee35593ca8f
Date: 2015-02-24 19:20:06
User: rkeene
Comment:Improved Slackware package building script
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2015-03-16
15:36
[e3ddb480d5] Improved "appfs-mkfs" latest detection (user: rkeene, tags: trunk)
2015-02-24
19:20
[516e8e6dd7] Improved Slackware package building script (user: rkeene, tags: trunk)
18:49
[aac1e74eab] Added sbindir for mount.appfs (user: rkeene, tags: trunk)
Changes

Modified build/make-slackware-package from [9a6e6df8ac] to [f3333b1483].

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
64
65
66
67
platform="$(uname -m)"
url="http://rkeene.org/devel/appfs/appfs-${version}.tar.gz"
make_args=(
	prefix=/usr
	sbindir=/sbin
	mandir=/usr/man
)







if [ -z "${version}" ]; then
	echo 'Usage: make-slackware-package <version>' >&2

	exit 1
fi

................................................................................
workdir="${TMPDIR:-/tmp}/appfs-slackware-package-${version}-$$${RANDOM}${RANDOM}${RANDOM}"
package="appfs-${version}-${platform}-${version_release}.txz"
mkdir "${workdir}" || exit 1

(
	PATH="${PATH}:/sbin"

	set -ex

	cd "${workdir}"

	installdir="$(pwd)/installed"

	wget -O appfs.tar.gz "${url}"
	tar -xf appfs.tar.gz

	cd "appfs-${version}"

	make "${make_args[@]}"
	make "${make_args[@]}" DESTDIR="${installdir}" install

	cd "${installdir}"

	mkdir install
	cat << \_EOF_ > install/slack-desc
appfs: appfs (App Filesystem)
appfs:
appfs: AppFS is a manifest-based FUSE filesystem that lazily fetches files over HTTP.
appfs: It is intended to be a universal packaging format.
appfs:
appfs:
appfs:
appfs:
appfs:
appfs:
appfs:
_EOF_

	makepkg -c n -l y "../${package}"


	xz -dc "../${package}" | tardy -User 0 -Group 0 | xz -9c > "../${package}.new"
	mv "../${package}.new" "../${package}"

) || exit 1

mv "${workdir}/${package}" .

rm -rf "${workdir}"

exit 0







>
>
>
>
>
>







 







|

|




|

|

|
|

|

|
|













|

>
|
|
>







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
64
65
66
67
68
69
70
71
72
73
74
75
platform="$(uname -m)"
url="http://rkeene.org/devel/appfs/appfs-${version}.tar.gz"
make_args=(
	prefix=/usr
	sbindir=/sbin
	mandir=/usr/man
)

if [ ! -f '/etc/slackware-version' ]; then
	echo 'This script is meant to be run on a Slackware system.' >&2

	exit 1
fi

if [ -z "${version}" ]; then
	echo 'Usage: make-slackware-package <version>' >&2

	exit 1
fi

................................................................................
workdir="${TMPDIR:-/tmp}/appfs-slackware-package-${version}-$$${RANDOM}${RANDOM}${RANDOM}"
package="appfs-${version}-${platform}-${version_release}.txz"
mkdir "${workdir}" || exit 1

(
	PATH="${PATH}:/sbin"

	set -x

	cd "${workdir}" || exit 1

	installdir="$(pwd)/installed"

	wget -O appfs.tar.gz "${url}"
	tar -xf appfs.tar.gz || exit 1

	cd "appfs-${version}" || exit 1

	make "${make_args[@]}" || exit 1
	make "${make_args[@]}" DESTDIR="${installdir}" install || exit 1

	cd "${installdir}" || exit 1

	mkdir install || exit 1
	cat << \_EOF_ > install/slack-desc || exit 1
appfs: appfs (App Filesystem)
appfs:
appfs: AppFS is a manifest-based FUSE filesystem that lazily fetches files over HTTP.
appfs: It is intended to be a universal packaging format.
appfs:
appfs:
appfs:
appfs:
appfs:
appfs:
appfs:
_EOF_

	makepkg -c n -l y "../${package}" || exit 1

	if [ "$(id -u)" != '0' ]; then
		xz -dc "../${package}" | tardy -User 0 -Group 0 | xz -9c > "../${package}.new" || exit 1
		mv "../${package}.new" "../${package}" || exit 1
	fi
) || exit 1

mv "${workdir}/${package}" .

rm -rf "${workdir}"

exit 0