sbcl rebuild
[arch-packages.git] / refind / repos / extra-any / PKGBUILD
blobabed14e8c74d0b7fc50a68470ed801920a07ea7a
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgbase=refind
4 pkgname=(refind refind-docs)
5 pkgver=0.13.3.1
6 pkgrel=1
7 pkgdesc="An EFI boot manager"
8 arch=(any)
9 url="https://www.rodsbooks.com/refind/"
10 makedepends=(bash dosfstools efibootmgr gnu-efi)
11 source=(https://sourceforge.net/projects/refind/files/$pkgver/$pkgname-src-$pkgver.tar.gz)
12 sha512sums=('7966df5dd8dc66cc49a329ed722a567672da8e2fa3f2334d53db65357cea17cba5a4dc5459e358de1079a938da3c63dc626d096ce28b6bf1fa2964be7359dbd1')
13 b2sums=('ab8dd27f82954ea6f9831f827550f27b5ca426b7783e918311ba7e178fc3509698a0107f61d0394a7893318528cb3e0c8491f4522de0a4aca6a40e0749f5a6f9')
14 _arch='x64'
16 prepare() {
17   cd $pkgbase-$pkgver
18   # remove the path prefix from the css reference, so that the css can live
19   # in the same directory
20   sed -e 's|../Styles/||g' -i docs/$pkgbase/*.html
21   # hardcode RefindDir, so that refind-install can find refind_x64.efi
22   sed -e 's|RefindDir=\"\$ThisDir/refind\"|RefindDir="/usr/share/refind/"|g' -i refind-install
25 build() {
26   cd $pkgname-$pkgver
27   make
28   make gptsync
29   # NOTE: build can not be parallelized
30   make fs -j1
33 package_refind() {
34   license=(BSD CCPL GPL2 GPL3 LGPL3)
35   depends=(bash dosfstools efibootmgr)
36   optdepends=(
37     'gptfdisk: for finding non-vfat ESP with refind-install'
38     'imagemagick: for refind-mkfont'
39     'openssl: for generating local certificates with refind-install'
40     'python: for refind-mkdefault'
41     'refind-docs: for HTML documentation'
42     'sbsigntools: for EFI binary signing with refind-install'
43     'sudo: for privilege elevation in refind-install and refind-mkdefault'
44   )
46   cd $pkgbase-$pkgver
47   # NOTE: the install target calls refind-install, therefore we install things
48   # manually
49   # efi binaries
50   install -vDm 644 refind/*.efi -t "$pkgdir/usr/share/$pkgname/"
51   install -vDm 644 drivers_*/*.efi -t "$pkgdir/usr/share/refind/drivers_$_arch/"
52   install -vDm 644 gptsync/*.efi -t "$pkgdir/usr/share/$pkgname/tools_$_arch/"
53   # sample config
54   install -vDm 644 $pkgname.conf-sample -t "$pkgdir/usr/share/$pkgname/"
55   # keys
56   install -vDm 644 keys/*{cer,crt} -t "$pkgdir/usr/share/$pkgname/keys/"
57   # keysdir
58   install -vdm 700 "$pkgdir/etc/refind.d/keys"
59   # fonts
60   install -vDm 644 fonts/*.png -t "$pkgdir/usr/share/$pkgname/fonts/"
61   # icons
62   install -vDm 644 icons/*.png -t "$pkgdir/usr/share/$pkgname/icons"
63   install -vDm 644 icons/svg/*.svg -t "$pkgdir/usr/share/$pkgname/icons/svg/"
64   # scripts
65   install -vDm 755 {refind-{install,mkdefault},mkrlconf,mvrefind} -t "$pkgdir/usr/bin/"
66   install -vDm 755 fonts/mkfont.sh "$pkgdir/usr/bin/$pkgname-mkfont"
67   # man pages
68   install -vDm 644 docs/man/*.8 -t "$pkgdir/usr/share/man/man8/"
69   # docs
70   install -vDm 644 {CREDITS,NEWS,README}.txt -t "$pkgdir/usr/share/doc/$pkgname/"
71   install -vDm 644 fonts/README.txt "$pkgdir/usr/share/doc/$pkgname/README.$pkgname-mkfont.txt"
72   install -vDm 644 icons/README "$pkgdir/usr/share/doc/$pkgname/README.icons.txt"
73   install -vDm 644 keys/README.txt "$pkgdir/usr/share/doc/$pkgname/README.keys.txt"
74   # license
75   install -vDm 644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
78 package_refind-docs() {
79   pkgdesc+=" - documentation"
80   license=(FDL1.3)
82   cd $pkgbase-$pkgver
83   install -vDm 644 docs/$pkgbase/*.{html,png,svg,txt} -t "$pkgdir/usr/share/doc/$pkgbase/html/"
84   install -vDm 644 docs/Styles/*.css -t "$pkgdir/usr/share/doc/$pkgbase/html/"
85   install -vDm 644 images/$pkgbase-banner.{png,svg} -t "$pkgdir/usr/share/doc/$pkgbase/html/"