summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e2ec0f7f4b1c7ce879225cb7b11cea5fd7616d2a (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
# Maintainer: Dariusz Dumas <dariusz@dareme.org>
pkgname=e-dowod
pkgver=4.3.0
pkgrel=1
pkgdesc="Helper tools for managing Polish electronic identity documents, enabling secure authentication and digital signing."
arch=('x86_64')
url="https://www.gov.pl/web/mswia/oprogramowanie-do-pobrania"
license=('custom' "MIT")
depends=()
makedepends=('fakeroot')
source=("https://www.gov.pl/pliki/edowod/$pkgname-$pkgver.run")
md5sums=('8bf382fa53377e05bd58398b592449e7')
options=(!strip)

build() {
WORKDIR="$srcdir/chroot"
rm -rf $WORKDIR 
mkdir -p $WORKDIR
cd $WORKDIR
mkdir tmp bin
ln -sf /bin/sh ./bin
ln -sf /bin/rm ./bin
ln -sf /bin/chmod ./bin
cp $srcdir/$pkgname-$pkgver.run ./bin/$pkgname-$pkgver.run
chmod +x ./bin/$pkgname-$pkgver.run

mkdir -p ./usr/share/applications/
mkdir -p ./etc/xdg/autostart

export PATH="/bin:$PATH"
fakechroot fakeroot chroot . $pkgname-$pkgver.run  install --accept-licenses --confirm-command

# remove temporary files for fakechroot
rm -rf bin tmp

# move licenses to proper folder
mkdir -p usr/share/
mv opt/$pkgname/Licenses/ usr/share/licenses

# remove installer files
cd opt/$pkgname && rm -rf uninstall* installerResources installer.dat components.xml InstallationLog.txt
}

package() {
cp -R $srcdir/chroot/* $pkgdir/
}