summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 791e590cf868c9fba5774e6e80104f24df7a96e3 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: eomanis at web dot de

_appname='freetz-ng-tools'
pkgname="${_appname}-git"
pkgver=r23089.ea5ac032a
pkgrel=1
pkgdesc="Development tools of the Freetz-NG project"
arch=('x86_64')
url='https://freetz-ng.github.io/freetz-ng/'
license=('GPL2')
depends=('sed')
makedepends=('git' 'python' 'svn' 'unzip' 'wget' 'lib32-glibc' 'lib32-gcc-libs')
# 2024-04-18 dreieck@aur.archlinux.org says build fails if the system
# has link-time optimization enabled by default in its build configuration
options+=('!lto')
conflicts=("$_appname" 'freetz-tools' 'freetz-tools-git')
provides=("$_appname" 'freetz-tools')
replaces=('freetz-tools-git')
source=("${_appname}::git+https://github.com/Freetz-NG/freetz-ng.git")
sha384sums=('SKIP')

pkgver() {

	cd "$srcdir"/"$_appname"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {

	cd "$srcdir"/"$_appname"
	make tools
}

package() {
	local binaries=()

	# Make a haphazard list of various binaries and scripts that look
	# useful
	#binaries+=(avm-rle-decode)
	#binaries+=(avm-rle-stream-length)
	binaries+=(bzimage2eva)
	binaries+=(eva2bzimage)
	binaries+=(eva2lzma)
	#binaries+=(imagename2id)
	binaries+=(lzma2eva)
	binaries+=(mksquashfs2-lzma)
	binaries+=(mksquashfs3-multi)
	binaries+=(mksquashfs4-avm-be)
	binaries+=(mksquashfs4-avm-le)
	binaries+=(remove-nmi-vector)
	#binaries+=(sfk)
	binaries+=(unsquashfs3-multi)
	binaries+=(unsquashfs4-avm-be)
	binaries+=(unsquashfs4-avm-le)

	cd -- "$srcdir"/"$_appname"/tools

	# Copy the binaries to /usr/bin
	mkdir --parents -- "${pkgdir}/usr/bin"
	cp --target "${pkgdir}/usr/bin" --no-dereference --preserve=links -- "${binaries[@]}"

	# Set the file permissions
	cd -- "${pkgdir}/usr/bin"
	chmod u=rwx,go=rx -- "${binaries[@]}"
}