archrelease: copy trunk to extra-x86_64
[arch-packages.git] / refind / trunk / PKGBUILD
bloba8064cadb6fd914d4a29717e7a66afdbfb2f34d3
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgbase=refind
4 pkgname=(refind refind-docs)
5 pkgver=0.14.0.2
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=('41c120c1afec37c508aa5c0ec09a6563c3047ef84932308c91701795b950431dfad17d25cf664039b490a302d475add98441b75f90ff71cadce41febedc68a9e')
13 b2sums=('02019ddb872ce44d2a2119902edebd633f925d49634e3bcc6bfb2c9dedb8ce213166909395a333d3a37e95c67720e31b1f5fcf25083801c17d645372aa54a06a')
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
23   # add vendor line to the sbat file
24   printf 'refind.%s,%s,%s,refind,%s,%s\n' 'arch' '1' 'Arch Linux' "${epoch:+${epoch}:}${pkgver}-${pkgrel}" 'https://archlinux.org/packages/?q=refind' >> refind-sbat.csv
27 build() {
28   cd $pkgname-$pkgver
29   make
30   make gptsync
31   make fs
34 package_refind() {
35   license=(BSD CCPL GPL2 GPL3 LGPL3)
36   depends=(bash dosfstools efibootmgr)
37   optdepends=(
38     'gptfdisk: for finding non-vfat ESP with refind-install'
39     'imagemagick: for refind-mkfont'
40     'openssl: for generating local certificates with refind-install'
41     'python: for refind-mkdefault'
42     'refind-docs: for HTML documentation'
43     'sbsigntools: for EFI binary signing with refind-install'
44     'sudo: for privilege elevation in refind-install and refind-mkdefault'
45   )
47   cd $pkgbase-$pkgver
48   # NOTE: the install target calls refind-install, therefore we install things
49   # manually
50   # efi binaries
51   install -vDm 644 refind/*.efi -t "$pkgdir/usr/share/$pkgname/"
52   install -vDm 644 drivers_*/*.efi -t "$pkgdir/usr/share/refind/drivers_$_arch/"
53   install -vDm 644 gptsync/*.efi -t "$pkgdir/usr/share/$pkgname/tools_$_arch/"
54   # sample config
55   install -vDm 644 $pkgname.conf-sample -t "$pkgdir/usr/share/$pkgname/"
56   # keys
57   install -vDm 644 keys/*{cer,crt} -t "$pkgdir/usr/share/$pkgname/keys/"
58   # keysdir
59   install -vdm 700 "$pkgdir/etc/refind.d/keys"
60   # fonts
61   install -vDm 644 fonts/*.png -t "$pkgdir/usr/share/$pkgname/fonts/"
62   # icons
63   install -vDm 644 icons/*.png -t "$pkgdir/usr/share/$pkgname/icons"
64   install -vDm 644 icons/svg/*.svg -t "$pkgdir/usr/share/$pkgname/icons/svg/"
65   # scripts
66   install -vDm 755 {refind-{install,mkdefault,sb-healthcheck},mkrlconf,mvrefind} -t "$pkgdir/usr/bin/"
67   install -vDm 755 fonts/mkfont.sh "$pkgdir/usr/bin/$pkgname-mkfont"
68   # man pages
69   install -vDm 644 docs/man/*.8 -t "$pkgdir/usr/share/man/man8/"
70   # docs
71   install -vDm 644 {CREDITS,NEWS,README}.txt -t "$pkgdir/usr/share/doc/$pkgname/"
72   install -vDm 644 fonts/README.txt "$pkgdir/usr/share/doc/$pkgname/README.$pkgname-mkfont.txt"
73   install -vDm 644 icons/README "$pkgdir/usr/share/doc/$pkgname/README.icons.txt"
74   install -vDm 644 keys/README.txt "$pkgdir/usr/share/doc/$pkgname/README.keys.txt"
75   # license
76   install -vDm 644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
79 package_refind-docs() {
80   pkgdesc+=" - documentation"
81   license=(FDL1.3)
83   cd $pkgbase-$pkgver
84   install -vDm 644 docs/$pkgbase/*.{html,png,svg,txt} -t "$pkgdir/usr/share/doc/$pkgbase/html/"
85   install -vDm 644 docs/Styles/*.css -t "$pkgdir/usr/share/doc/$pkgbase/html/"
86   install -vDm 644 images/$pkgbase-banner.{png,svg} -t "$pkgdir/usr/share/doc/$pkgbase/html/"