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

pkgname=firejail
pkgver=0.9.34
pkgrel=1
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=('456751a987c89b020c7152ab9b3aabd69b573c64daff84ca8d36acd74ebe0d268bc2be879d02ab95842d8afb1b1e47b3917650593c24bf74cb287a821b67df00'
'SKIP'
'SKIP'
'6d855868069dffdb416f31376cc1069d330e792f34970524dc83d67b14416f57cef68955a980fe2ec102590ae91757fb45f45f4d18e5320a385a1bbca2f39192')

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/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/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
}