summaryrefslogtreecommitdiff
blob: 176f7b74ebe6f3e711691ebc87ae86c9eaf08eb0 (plain)
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
#!/bin/bash

. /etc/init.d/functions.sh

if [[ $# -eq 0 || $# -gt 2 ]] ; then
	exec echo "Usage: $0 <version> [netpbm svn root]"
fi

PN=netpbm
PV=$1
P=${PN}-${PV}

SVN_ROOT=${2:-/usr/local/src}

T=/tmp

maint_pkg_create() {
	local base="/usr/local/src"
	local srcdir="${base}/netpbm/release_number"
	if [[ -d ${srcdir} ]] ; then
		cd "${T}" || die

		rm -rf ${P}

		ebegin "Exporting ${srcdir}/${PV} to ${P}"
		svn export -q ${srcdir}/${PV} ${P}
		eend $? || return 1

		ebegin "Creating ${P}.tar.xz"
		tar cf - ${P} | xz > ${P}.tar.xz
		eend $?

		einfo "Tarball now ready at: ${T}/${P}.tar.xz"
	else
		einfo "You need to run:"
		einfo " cd ${base}"
		einfo " svn co https://netpbm.svn.sourceforge.net/svnroot/netpbm"
		die "need svn checkout dir"
	fi
}
maint_pkg_create