PKGBUILD 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. # Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org>
  2. # Maintainer (Arch): Thomas Bächler <thomas@archlinux.org>
  3. # Maintainer (Arch): Anatol Pomozov <anatol.pomozov@gmail.com>
  4. # Contributor (Arch): Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
  5. # Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
  6. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  7. pkgname=syslinux
  8. pkgver=6.04.pre2.r11.gbf6db5b4
  9. #_tag=syslinux-$pkgver
  10. _commit=bf6db5b4
  11. pkgrel=3
  12. pkgrel+=.parabola1
  13. pkgdesc='Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE'
  14. pkgdesc+=' (Parabola rebranded)'
  15. url='https://www.syslinux.org/'
  16. arch=(x86_64)
  17. arch+=(i686)
  18. backup=(boot/syslinux/syslinux.cfg)
  19. backup+=(boot/syslinux/splash.png)
  20. install=syslinux.install
  21. license=(GPL2)
  22. # syslinux build system is a mess of submakes that does not work with -jN
  23. # efi32/com32 do not like Parabola cflags/ldflags, though it would be nice to have the flags for userspace tools
  24. options=(!makeflags !buildflags)
  25. replaces=(${pkgname}-parabola)
  26. conflicts=(${pkgname}-parabola)
  27. makedepends=(git python nasm upx asciidoc)
  28. makedepends_x86_64=(lib32-glibc) # efi32 needs it
  29. optdepends=('perl-crypt-passwdmd5: For md5pass'
  30. 'perl-digest-sha1: For sha1pass'
  31. 'mtools: For mkdiskimage and syslinux support'
  32. 'gptfdisk: For GPT support'
  33. 'util-linux: For isohybrid'
  34. 'efibootmgr: For EFI support'
  35. 'dosfstools: For EFI support')
  36. # The syslinux-install_update script is maintained at https://gist.github.com/pyther/772138
  37. # Script not yet updated for syslinux-efi
  38. source=(git+https://repo.or.cz/syslinux.git#commit=$_commit
  39. gnu-efi::git://git.code.sf.net/p/gnu-efi/code
  40. syslinux.cfg
  41. syslinux-install_update
  42. 0002-gfxboot-menu-label.patch
  43. 0005-gnu-efi-version-compatibility.patch
  44. 0017-single-load-segment.patch
  45. 0004-gnu-efi-from-arch.patch
  46. 0016-strip-gnu-property.patch
  47. 0018-prevent-pow-optimization.patch
  48. 0025-reproducible-build.patch
  49. splash.png
  50. )
  51. sha1sums=('SKIP'
  52. 'SKIP'
  53. 'e40acf4cf9d05ec000c59284f959d1540b35a3be'
  54. 'df5160a138ca8c6502d67fe1a64fec78b50e82c2'
  55. '69239fda4a3d5a247f0e48c5c683e0124c7d9201'
  56. '1e0cd52252622f206d22e84f2a4d358508c902f4'
  57. '81d05572b15dc5c55b63489fecdc79a6a332959c'
  58. '4c3706e7a5620e450a6abb9238c08d7b39bb6945'
  59. 'f4a6768c7e5b8d02428ae550e37a7ca445ad1bb8'
  60. 'c94622eaa14ad9512e4f43b13302ba35d1787cbc'
  61. '5b3878a1fff74bbb09ddbc66cc8afa38f34ed05c'
  62. 'aab1c7789e0d7290fe87538abad181abac069d40')
  63. sha256sums=('SKIP'
  64. 'SKIP'
  65. '67fe3050e60a0d1572293ff095dac2e6cab9da6d0f98fb1fc555850ec046d6ea'
  66. '5f86b5813465c48ba7bd178389aacb5149ff0b5f2467ab1772a4f862c5b15d41'
  67. 'd1fe9084ce2526619f94b8a07b89fb0194e874beef9f202f8b974879d77f2e1a'
  68. '8610959df6c01568ff478ca1eb4aac301f3ba1f5bd4739daaec072865e8be2d7'
  69. '5b017ba5eae77caa09fa5af6ecfa0df1e7e22776b2b13c8744c6cb7ecd7ad0e9'
  70. 'cf3c3da9300d6ea70eab5b8dca724ce03a3651bd63fb0168594dcfeb35eec11c'
  71. '7facb5c2abc71c9bfe01bf4db388306ed7b7abf6654009af336262839527f962'
  72. '755cd7062fe8495f6f62053ce664451c12ae65dba9fb5c75062a495fbe040fb1'
  73. '9a76f6f75a42485bc337163ba38068b09f7889bdc1a4e191408898f10de36662'
  74. 'a839e3e1242c5279f95f5f913af47be73cf16339c7aa55af378a428c904f1595')
  75. _targets='bios efi32'
  76. case "$CARCH" in
  77. x86_64) _targets+=' efi64' ;;
  78. esac
  79. pkgver() {
  80. cd syslinux
  81. git describe --long | sed 's/^syslinux-//;s/\([^-]*-g\)/r\1/;s/-/./g'
  82. }
  83. prepare() {
  84. cd syslinux
  85. patch -p1 < ../0002-gfxboot-menu-label.patch
  86. patch -p1 < ../0017-single-load-segment.patch
  87. patch -p1 < ../0016-strip-gnu-property.patch
  88. patch -p1 < ../0018-prevent-pow-optimization.patch
  89. # TODO: use 'gnu-efi-libs' package instead of embedded sources
  90. # patch -p1 < ../0004-gnu-efi-from-arch.patch
  91. # patch -p1 < ../0005-gnu-efi-version-compatibility.patch
  92. patch -p1 < ../0025-reproducible-build.patch
  93. # do not swallow efi compilation output to make debugging easier
  94. sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
  95. # disable debug and development flags to reduce bootloader size
  96. truncate --size 0 mk/devel.mk
  97. git submodule init
  98. git config --local submodule.gnu-efi.url "$srcdir/gnu-efi"
  99. git submodule update
  100. }
  101. build() {
  102. cd syslinux
  103. export LDFLAGS+=--no-dynamic-linker # workaround for binutils 2.28 http://www.syslinux.org/wiki/index.php?title=Building
  104. export EXTRA_CFLAGS=-fno-PIE # to fix gpxe build
  105. make PYTHON=python $_targets
  106. }
  107. package() {
  108. cd syslinux
  109. make $_targets install INSTALLROOT="$pkgdir" SBINDIR=/usr/bin MANDIR=/usr/share/man AUXDIR=/usr/lib/syslinux
  110. rm -r "$pkgdir"/usr/lib/syslinux/{com32,dosutil,syslinux.com}
  111. install -D -m644 COPYING "$pkgdir"/usr/share/licenses/syslinux/COPYING
  112. install -d "$pkgdir"/usr/share/doc
  113. cp -ar doc "$pkgdir"/usr/share/doc/syslinux
  114. install -d "$pkgdir"/usr/lib/syslinux/bios
  115. mv "$pkgdir"/usr/lib/syslinux/{*.bin,*.c32,*.0,memdisk} "$pkgdir"/usr/lib/syslinux/bios
  116. install -D -m0644 ../syslinux.cfg "$pkgdir"/boot/syslinux/syslinux.cfg
  117. install -D -m0755 ../syslinux-install_update "$pkgdir"/usr/bin/syslinux-install_update
  118. install -D -m0644 ../splash.png "$pkgdir"/boot/syslinux/splash.png
  119. }