summaryrefslogtreecommitdiff
path: root/pcr/firejail/PKGBUILD
blob: 51340d7694fcf0171fba47bbb9b787200f8d8af2 (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
# Maintainer: Luke R. <g4jc@openmailbox.org> GPG: rsa4096/3EAE8697
# Contributor (Arch): ajs124 < aur AT ajs124 DOT de > 

pkgname=firejail
pkgver=0.9.36
pkgrel=2
pkgdesc="Linux namespaces sandbox program"
arch=('i686' 'x86_64' 'armv7h')
license=(GPL2)
url=https://l3net.wordpress.com/projects/firejail/
source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgname-$pkgver.tar.bz2"
'PKGBUILD'
'PKGBUILD.sig'
"$pkgname.install")
install=("$pkgname.install")
validpgpkeys=('CB6E213A349B8DF9E96B622AC3F4FFCF3EAE8697') # PKGBUILD Maintainer's key
sha512sums=('8b9b7f3dd071825117a45e41c1e33871bf4f7788faf27f322913079a7094e6fa4eb7a94362630664c4b441213c357531a2f9f41bd94ff06c64bc6f8a6ee68fd1'
            'SKIP'
            'SKIP'
            '8e8638616aa7b2cdfbdc2eb27ebfb7caf5ffce2d45c293554e0dcecaa4bcef7cae108953c1a0a8463bc6b6ef44633d9876a2d2d8628f3b5b8e4b2c7ccfe8b5ec')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"

	## Begin Removal of non-libre program profiles. ##
	rm ${srcdir}/${pkgname}-${pkgver}/etc/chromium-browser.profile
	sed -i 's|install -c -m 0644 .etc/chromium-browser.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in

	rm ${srcdir}/${pkgname}-${pkgver}/etc/chromium.profile
	sed -i 's|install -c -m 0644 .etc/chromium.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in

	rm ${srcdir}/${pkgname}-${pkgver}/etc/google-chrome.profile
	sed -i 's|install -c -m 0644 .etc/google-chrome.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in

	rm ${srcdir}/${pkgname}-${pkgver}/etc/google-chrome-beta.profile
	sed -i 's|install -c -m 0644 .etc/google-chrome-beta.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in
	
	rm ${srcdir}/${pkgname}-${pkgver}/etc/google-chrome-stable.profile
	sed -i 's|install -c -m 0644 .etc/google-chrome-stable.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in
	
	rm ${srcdir}/${pkgname}-${pkgver}/etc/google-chrome-unstable.profile
	sed -i 's|install -c -m 0644 .etc/google-chrome-unstable.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in

	rm ${srcdir}/${pkgname}-${pkgver}/etc/dropbox.profile
	sed -i 's|install -c -m 0644 .etc/dropbox.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in
	
	rm ${srcdir}/${pkgname}-${pkgver}/etc/opera.profile
	sed -i 's|install -c -m 0644 .etc/opera.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in
	
	rm ${srcdir}/${pkgname}-${pkgver}/etc/opera-beta.profile
	sed -i 's|install -c -m 0644 .etc/opera-beta.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in

	rm ${srcdir}/${pkgname}-${pkgver}/etc/spotify.profile
	sed -i 's|install -c -m 0644 .etc/spotify.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in

	rm ${srcdir}/${pkgname}-${pkgver}/etc/steam.profile
	sed -i 's|install -c -m 0644 .etc/steam.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in

	rm ${srcdir}/${pkgname}-${pkgver}/etc/skype.profile
	sed -i 's|install -c -m 0644 .etc/skype.profile $(DESTDIR)/$(sysconfdir)/firejail/.||'  ${srcdir}/${pkgname}-${pkgver}/Makefile.in
        ### End Removing of non-free files ###

}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	# fix build
	export CFLAGS=${CFLAGS/-fsanitize=undefined/}
	./configure --prefix=/usr
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
}