summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11165debc573c17e166dfb9573c9e09c585a1a73 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Maintainer: Jonathan Schleifer <js@nil.im>
pkgname=('libobjfw' 'libobjfwrt' 'libobjfwtls' 'libobjfwhid' 'ofarc' 'ofdns'
         'ofhash' 'ofhttp')
pkgbase=objfw
pkgver=1.2.1
pkgrel=1
pkgdesc="Portable, lightweight framework for the Objective-C language"
arch=('x86_64')
url="https://objfw.nil.im/"
license=('LGPL3')
groups=(objfw)
makedepends=(clang)
source=("https://objfw.nil.im/downloads/$pkgbase-$pkgver.tar.gz")
sha256sums=(637fdeccae149cec236e62c5289450afad542fe930343918856e76594ab3fcfd)

build() {
	cd "$pkgbase-$pkgver"
	./configure OBJC=clang --prefix=/usr --with-tls=openssl
	make
}

check() {
	cd "$pkgbase-$pkgver"
	make check
}

package_libobjfw() {
	pkgdesc="ObjFW library"
	depends=(glibc gcc-libs libobjfwrt bash)

	cd "$pkgbase-$pkgver"
	make DESTDIR="$pkgdir/" install

	for i in COPYING COPYING.LESSER; do
		install -D -m 644 "$i" "$pkgdir/usr/share/licenses/$pkgname/$i"
	done

	# Those are in subpackages
	rm -f "$pkgdir/usr/bin/ofarc"
	rm -f "$pkgdir/usr/bin/ofdns"
	rm -f "$pkgdir/usr/bin/ofhash"
	rm -f "$pkgdir/usr/bin/ofhttp"
	rm -fr "$pkgdir/usr/include/ObjFWHID"
	rm -fr "$pkgdir/usr/include/ObjFWRT"
	rm -fr "$pkgdir/usr/include/ObjFWTLS"
	rm -f "$pkgdir/usr/lib/libobjfwhid.so"*
	rm -f "$pkgdir/usr/lib/libobjfwrt.so"*
	rm -f "$pkgdir/usr/lib/libobjfwtls.so"*
	rm -f "$pkgdir/usr/lib/objfw-config/ObjFWHID.oc"
	rm -f "$pkgdir/usr/lib/objfw-config/ObjFWTLS.oc"
	rm -f "$pkgdir/usr/share/man/man1/ofarc.1"
	rm -f "$pkgdir/usr/share/man/man1/ofdns.1"
	rm -f "$pkgdir/usr/share/man/man1/ofhash.1"
	rm -f "$pkgdir/usr/share/man/man1/ofhttp.1"
	rm -fr "$pkgdir/usr/share/ofarc"
	rm -fr "$pkgdir/usr/share/ofdns"
	rm -fr "$pkgdir/usr/share/ofhash"
	rm -fr "$pkgdir/usr/share/ofhttp"
}

package_libobjfwrt() {
	pkgdesc="ObjFW Objective-C runtime library"
	depends=(glibc gcc-libs)

	cd "$pkgbase-$pkgver"
	make -C src/runtime DESTDIR="$pkgdir/" install

	for i in COPYING COPYING.LESSER; do
		install -D -m 644 "$i" "$pkgdir/usr/share/licenses/$pkgname/$i"
	done
}

package_libobjfwtls() {
	pkgdesc="TLS support for ObjFW"
	depends=(glibc gcc-libs libobjfw libobjfwrt openssl)

	cd "$pkgbase-$pkgver"
	make -C src/tls DESTDIR="$pkgdir/" install

	for i in COPYING COPYING.LESSER; do
		install -D -m 644 "$i" "$pkgdir/usr/share/licenses/$pkgname/$i"
	done
}

package_libobjfwhid() {
	pkgdesc="HID support for ObjFW"
	depends=(glibc gcc-libs libobjfw libobjfwrt)

	cd "$pkgbase-$pkgver"
	make -C src/hid DESTDIR="$pkgdir/" install

	for i in COPYING COPYING.LESSER; do
		install -D -m 644 "$i" "$pkgdir/usr/share/licenses/$pkgname/$i"
	done
}

package_ofarc() {
	pkgdesc="Utility for handling ZIP, Tar, LHA and Zoo archives"
	depends=(glibc gcc-libs libobjfw libobjfwrt)

	cd "$pkgbase-$pkgver"
	make -C utils/ofarc DESTDIR="$pkgdir/" install

	for i in COPYING COPYING.LESSER; do
		install -D -m 644 "$i" "$pkgdir/usr/share/licenses/$pkgname/$i"
	done
}

package_ofdns() {
	pkgdesc="Utility for performing DNS requests on the command line"
	depends=(glibc gcc-libs libobjfw libobjfwrt)

	cd "$pkgbase-$pkgver"
	make -C utils/ofdns DESTDIR="$pkgdir/" install

	for i in COPYING COPYING.LESSER; do
		install -D -m 644 "$i" "$pkgdir/usr/share/licenses/$pkgname/$i"
	done
}

package_ofhash() {
	pkgdesc="Utility to hash files with various cryptographic hash functions"
	depends=(glibc gcc-libs libobjfw libobjfwrt)

	cd "$pkgbase-$pkgver"
	make -C utils/ofhash DESTDIR="$pkgdir/" install

	for i in COPYING COPYING.LESSER; do
		install -D -m 644 "$i" "$pkgdir/usr/share/licenses/$pkgname/$i"
	done
}

package_ofhttp() {
	pkgdesc="Command line downloader for HTTP(S)"
	depends=(glibc gcc-libs libobjfw libobjfwrt libobjfwtls)

	cd "$pkgbase-$pkgver"
	make -C utils/ofhttp DESTDIR="$pkgdir/" install

	for i in COPYING COPYING.LESSER; do
		install -D -m 644 "$i" "$pkgdir/usr/share/licenses/$pkgname/$i"
	done
}