PKGBUILD 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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: Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
  5. # Contributor: André Silva <emulatorman@hyperbola.info>
  6. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  7. pkgname=syslinux
  8. pkgver=6.03
  9. _tag=syslinux-$pkgver
  10. pkgrel=11.parabola1
  11. pkgdesc='Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE (Parabola rebranded)'
  12. url='http://www.syslinux.org/'
  13. arch=(i686 x86_64)
  14. backup=(boot/syslinux/syslinux.cfg
  15. boot/syslinux/splash.png)
  16. install=syslinux.install
  17. license=(GPL2)
  18. # syslinux build system is a mess of submakes that does not work with -jN
  19. # efi32/com32 do not like Parabola cflags/ldflags, though it would be nice to have the flags for userspace tools
  20. options=(!makeflags !buildflags)
  21. replaces=(${pkgname}-parabola)
  22. conflicts=(${pkgname}-parabola)
  23. makedepends=(git python2 nasm upx asciidoc)
  24. makedepends_x86_64=(lib32-glibc) # efi32 needs it
  25. optdepends=('perl-crypt-passwdmd5: For md5pass'
  26. 'perl-digest-sha1: For sha1pass'
  27. 'mtools: For mkdiskimage and syslinux support'
  28. 'gptfdisk: For GPT support'
  29. 'util-linux: For isohybrid'
  30. 'efibootmgr: For EFI support'
  31. 'dosfstools: For EFI support')
  32. # The syslinux-install_update script is maintained at https://gist.github.com/pyther/772138
  33. # Script not yet updated for syslinux-efi
  34. source=(git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git#tag=$_tag
  35. git://git.code.sf.net/p/gnu-efi/code#commit=ab54e2b40e914d0ca01dc3d44c8d4eb8517bf999
  36. syslinux.cfg
  37. syslinux-install_update
  38. btrfs-fix.patch::http://repo.or.cz/syslinux.git/patch/548386049cd41e887079cdb904d3954365eb28f3?hp=721a0af2f0ba111c31685c5f6c5481eb25346971
  39. gcc-fix-alignment.patch::http://repo.or.cz/syslinux.git/patch/e5f2b577ded109291c9632dacb6eaa621d8a59fe?hp=8dc6d758b564a1ccc44c3ae11f265d43628219ce
  40. dont-guess-alignment.patch::http://repo.or.cz/syslinux.git/patch/0cc9a99e560a2f52bcf052fd85b1efae35ee812f?hp=e5f2b577ded109291c9632dacb6eaa621d8a59fe
  41. kdb-230.patch::http://repo.or.cz/syslinux.git/patch/138e850fab106b5235178848b3e0d33e25f4d3a2
  42. correct_base_type.patch::http://repo.or.cz/syslinux.git/patch/83aad4f
  43. set_mode_base.patch::http://repo.or.cz/syslinux.git/patch/0a2dbb3
  44. fix_return_pointer.patch::http://repo.or.cz/syslinux.git/patch/8dc6d758b564a1ccc44c3ae11f265d43628219ce
  45. support-ext4-64bit.patch::http://repo.or.cz/syslinux.git/patch/af7e95c32cea40c1e443ae301e64b27f068b4915
  46. efi_no_kbd.patch::http://repo.or.cz/syslinux.git/patch/73bb3701a19a9eeb30b6f77ff7612ca2a9cd3f38
  47. fix_infinite_loop_tests.patch
  48. syslinux-sysmacros.patch
  49. gnu-efi-git.patch
  50. 0016-strip-gnu-property.patch
  51. splash.png)
  52. sha1sums=('SKIP'
  53. 'SKIP'
  54. 'e40acf4cf9d05ec000c59284f959d1540b35a3be'
  55. 'df5160a138ca8c6502d67fe1a64fec78b50e82c2'
  56. '6ebf77bf028c928a6ef33dadeee7402b3113b6d3'
  57. 'eaa9f5cd82b501f076ece4812d2d37f49d02caae'
  58. 'c6a6e96e233b2f8105503725cd614abc1bac2845'
  59. 'f50e0a92c65536ef73a84614d489e52d9d1db329'
  60. 'e24bf5b1617bab4a3f46925c5a8ee6079f4686bf'
  61. '500c174fce91133d40024b28f6f5cedb144b84c2'
  62. 'b3d2196aaec154749c5b796c6d9bfd605a918cf8'
  63. 'fe3ab41235aa57259bb6af8cc30c5877c1d8fb57'
  64. '26d9596fd2b2fd92c30b8a441c18176c6b4e0f4d'
  65. '7ecb02550666dfafeb0b22a67dcc34caa4b79767'
  66. '52c5233da147acd41d542b1673835be966b561e3'
  67. '324af118594e6fb0864ef4905ce47d95c4d8e6ef'
  68. 'd85d3a2c237472cecf68aee493ee2028ebab349b'
  69. 'aab1c7789e0d7290fe87538abad181abac069d40')
  70. _targets='bios efi32'
  71. case "$CARCH" in
  72. x86_64) _targets+=' efi64' ;;
  73. esac
  74. prepare() {
  75. cd syslinux
  76. # FS#48253
  77. patch -p1 < ../gcc-fix-alignment.patch
  78. patch -p1 < ../dont-guess-alignment.patch
  79. # FS#48214
  80. patch -p1 < ../btrfs-fix.patch
  81. # FS#49046
  82. patch -p1 < ../kdb-230.patch
  83. # FS#53083
  84. patch -p1 < ../correct_base_type.patch
  85. patch -p1 < ../set_mode_base.patch
  86. # FS#49250
  87. patch -p1 < ../fix_return_pointer.patch
  88. # fix infinite loop in load_linux
  89. patch -p1 < ../fix_infinite_loop_tests.patch
  90. # FS#58137
  91. patch -p1 < ../support-ext4-64bit.patch
  92. # FS#59450
  93. patch -p1 < ../efi_no_kbd.patch
  94. patch -p1 < ../syslinux-sysmacros.patch
  95. patch -p1 < ../gnu-efi-git.patch
  96. patch -p1 < ../0016-strip-gnu-property.patch
  97. # do not swallow efi compilation output to make debugging easier
  98. sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
  99. # disable debug and development flags to reduce bootloader size
  100. truncate --size 0 mk/devel.mk
  101. mkdir -p gnu-efi
  102. cp -rv $srcdir/code/gnu-efi-3.0 gnu-efi
  103. }
  104. build() {
  105. cd syslinux
  106. export LDFLAGS+=--no-dynamic-linker # workaround for binutils 2.28 http://www.syslinux.org/wiki/index.php?title=Building
  107. export EXTRA_CFLAGS=-fno-PIE # to fix gpxe build
  108. make PYTHON=python2 $_targets
  109. }
  110. check() {
  111. cd syslinux
  112. make unittest
  113. }
  114. package() {
  115. cd syslinux
  116. make $_targets install INSTALLROOT="$pkgdir" SBINDIR=/usr/bin MANDIR=/usr/share/man AUXDIR=/usr/lib/syslinux
  117. rm -r "$pkgdir"/usr/lib/syslinux/{com32,dosutil,syslinux.com}
  118. install -D -m644 COPYING "$pkgdir"/usr/share/licenses/syslinux/COPYING
  119. install -d "$pkgdir"/usr/share/doc
  120. cp -ar doc "$pkgdir"/usr/share/doc/syslinux
  121. install -d "$pkgdir"/usr/lib/syslinux/bios
  122. mv "$pkgdir"/usr/lib/syslinux/{*.bin,*.c32,*.0,memdisk} "$pkgdir"/usr/lib/syslinux/bios
  123. install -D -m0644 ../syslinux.cfg "$pkgdir"/boot/syslinux/syslinux.cfg
  124. install -D -m0755 ../syslinux-install_update "$pkgdir"/usr/bin/syslinux-install_update
  125. install -D -m0644 ../splash.png "$pkgdir"/boot/syslinux/splash.png
  126. }