Debian Codegraph @

package/python-kiwi-pkgbuild-template

raw
1 # Maintainer: Marcus Schaefer <[email protected]>
2 # Maintainer: David Cassany <[email protected]>
3
4 pkgname=('python-kiwi' 'kiwi-man-pages' 'dracut-kiwi-lib' 'dracut-kiwi-oem-repart' 'dracut-kiwi-oem-dump' 'dracut-kiwi-live' 'dracut-kiwi-overlay')
5 arch=(x86_64)
6 pkgver=%%VERSION
7 pkgrel=0
8 pkgdesc="KIWI - Appliance Builder Next Generation"
9 url="https://github.com/SUSE/kiwi/tarball/master"
10 license=('GPL3')
11 makedepends=(make gcc python-build python-docopt python-installer python-lxml python-poetry-core python-requests python-simplejson python-sphinx python-sphinx_rtd_theme python-wheel python-yaml shadow grep)
12 provides=(kiwi-ng kiwi)
13 source=("${pkgname}.tar.gz")
14 changelog="${pkgname}.changes"
15 md5sums=('%%MD5SUM')
16
17
18 build() {
19 export LANG=C.UTF-8
20 export LC_ALL=C.UTF-8
21 cd kiwi-${pkgver}
22 # Temporarily switch things back to docopt
23 # FIXME: Drop this hack as soon as we can...
24 sed -e 's/docopt-ng.*/docopt = ">=0.6.2"/' -i pyproject.toml
25 make -C doc man
26 python3 -m build --no-isolation --wheel
27 }
28
29 package_python-kiwi(){
30 depends=(python-docopt python-simplejson python-lxml python-requests python-yaml grub qemu squashfs-tools gptfdisk pacman e2fsprogs xfsprogs btrfs-progs libisoburn lvm2 mtools parted multipath-tools rsync tar shadow screen kiwi-man-pages)
31 optdepends=('gnupg: keyring creation for APT package manager')
32 cd kiwi-${pkgver}
33 python3 -m installer --destdir "${pkgdir}/" dist/*.whl
34 ln -sr "${pkgdir}/usr/bin/kiwi-ng" "${pkgdir}/usr/bin/kiwi"
35 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
36 }
37
38 package_kiwi-man-pages(){
39 cd kiwi-${pkgver}
40 make buildroot="${pkgdir}/" docdir="/usr/share/doc/${pkgname}" install_package_docs
41 }
42
43 package_dracut-kiwi-lib(){
44 depends=(cryptsetup btrfs-progs gptfdisk coreutils e2fsprogs grep lvm2 mdadm parted util-linux xfsprogs dialog curl xz device-mapper dracut pv bc)
45 cd kiwi-${pkgver}
46 install -d -m 755 ${pkgdir}/usr/lib/dracut/modules.d/59kiwi-lib
47 cp -a dracut/modules.d/59kiwi-lib ${pkgdir}/usr/lib/dracut/modules.d/
48 }
49
50 package_dracut-kiwi-oem-repart(){
51 depends=(dracut-kiwi-lib=${pkgver})
52 cd kiwi-${pkgver}
53 install -d -m 755 ${pkgdir}/usr/lib/dracut/modules.d/55kiwi-repart
54 cp -a dracut/modules.d/55kiwi-repart ${pkgdir}/usr/lib/dracut/modules.d/
55 }
56
57 package_dracut-kiwi-oem-dump(){
58 depends=(dracut-kiwi-lib=${pkgver} multipath-tools kexec-tools)
59 cd kiwi-${pkgver}
60 install -d -m 755 ${pkgdir}/usr/lib/dracut/modules.d/55kiwi-dump
61 cp -a dracut/modules.d/55kiwi-dump ${pkgdir}/usr/lib/dracut/modules.d/
62 cp -a dracut/modules.d/59kiwi-dump-reboot ${pkgdir}/usr/lib/dracut/modules.d/
63 }
64
65 package_dracut-kiwi-live(){
66 depends=(dracut dialog xfsprogs e2fsprogs util-linux device-mapper libisoburn parted)
67 cd kiwi-${pkgver}
68 install -d -m 755 ${pkgdir}/usr/lib/dracut/modules.d/55kiwi-live
69 cp -a dracut/modules.d/55kiwi-live ${pkgdir}/usr/lib/dracut/modules.d/
70 }
71
72 package_dracut-kiwi-overlay(){
73 depends=(dracut util-linux)
74 cd kiwi-${pkgver}
75 install -d -m 755 ${pkgdir}/usr/lib/dracut/modules.d/55kiwi-overlay
76 cp -a dracut/modules.d/55kiwi-overlay ${pkgdir}/usr/lib/dracut/modules.d/
77 }
78
79 package_dracut-kiwi-verity(){
80 depends=(dracut util-linux)
81 cd kiwi-${pkgver}
82 install -d -m 755 ${pkgdir}/usr/lib/dracut/modules.d/55kiwi-verity
83 cp -a dracut/modules.d/50kiwi-verity ${pkgdir}/usr/lib/dracut/modules.d/
84 }