Check-in [fc66612d12]
Overview
SHA1:fc66612d125d3ceb682259309cf8edb51ed009ef
Date: 2015-02-24 18:25:55
User: rkeene
Comment:Added script to create Slackware package
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2015-02-24
18:49
[aac1e74eab] Added sbindir for mount.appfs (user: rkeene, tags: trunk)
18:25
[fc66612d12] Added script to create Slackware package (user: rkeene, tags: trunk)
2014-12-29
04:41
[3de2aab453] AppFS 1.4 (user: rkeene, tags: trunk, 1.4)
Changes

Added build/make-slackware-package version [023d46f66e].

            1  +#! /usr/bin/env bash
            2  +
            3  +version="$1"
            4  +version_release='1'
            5  +platform="$(uname -m)"
            6  +url="http://rkeene.org/devel/appfs/appfs-${version}.tar.gz"
            7  +make_args=(
            8  +	prefix=/usr
            9  +	mandir=/usr/man
           10  +)
           11  +
           12  +if [ -z "${version}" ]; then
           13  +	echo 'Usage: make-slackware-package <version>' >&2
           14  +
           15  +	exit 1
           16  +fi
           17  +
           18  +workdir="${TMPDIR:-/tmp}/appfs-slackware-package-${version}-$$${RANDOM}${RANDOM}${RANDOM}"
           19  +package="appfs-${version}-${platform}-${version_release}.txz"
           20  +mkdir "${workdir}" || exit 1
           21  +
           22  +(
           23  +	PATH="${PATH}:/sbin"
           24  +
           25  +	set -ex
           26  +
           27  +	cd "${workdir}"
           28  +
           29  +	installdir="$(pwd)/installed"
           30  +
           31  +	wget -O appfs.tar.gz "${url}"
           32  +	tar -xf appfs.tar.gz
           33  +
           34  +	cd "appfs-${version}"
           35  +
           36  +	make "${make_args[@]}"
           37  +	make "${make_args[@]}" DESTDIR="${installdir}" install
           38  +
           39  +	cd "${installdir}"
           40  +
           41  +	mkdir install
           42  +	cat << \_EOF_ > install/slack-desc
           43  +appfs: appfs (App Filesystem)
           44  +appfs:
           45  +appfs: AppFS is a manifest-based FUSE filesystem that lazily fetches files over HTTP.
           46  +appfs: It is intended to be a universal packaging format.
           47  +appfs:
           48  +appfs:
           49  +appfs:
           50  +appfs:
           51  +appfs:
           52  +appfs:
           53  +appfs:
           54  +_EOF_
           55  +
           56  +	makepkg -c n -l y "../${package}"
           57  +
           58  +	xz -dc "../${package}" | tardy -User 0 -Group 0 | xz -9c > "../${package}.new"
           59  +	mv "../${package}.new" "../${package}"
           60  +) || exit 1
           61  +
           62  +mv "${workdir}/${package}" .
           63  +
           64  +rm -rf "${workdir}"
           65  +
           66  +exit 0