syslinux-vl.spec 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. # this is to keep rpmbuild from thinking the .c32 / .com / .0 / memdisk files
  2. # in noarch packages are a reason to stop the build.
  3. %define _binaries_in_noarch_packages_terminate_build 0
  4. Summary: Simple kernel loader which uses a FAT ot iso9660 filesystem ot a PXE network
  5. Summary(ja): FAT/iso9660 ファイルシステムまたは PXE ネットワークを利用するシンプルなカーネルローダー
  6. Name: syslinux
  7. Version: 6.04
  8. %global pre_relase pre1
  9. Release: 1%{?_dist_release}
  10. Group: system
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. Packager: daisuke, shaolin
  14. License: GPLv2+
  15. URL: https://wiki.syslinux.org/wiki/index.php?title=The_Syslinux_Project
  16. Source0: https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux{?pre_relase:/Testing/%{version}}/syslinux-%{version}%{?pre_relase:-%{pre_relase}}.tar.xz
  17. # upstream patches
  18. Patch0: syslinux-6.04-20210324.patch
  19. Patch100: 0015-efi-main.c-include-efisetjmp.h.patch
  20. # debian patches
  21. Patch1004: 0004-gnu-efi-from-debian.patch
  22. Patch1016: 0016-strip-gnu-property.patch
  23. Patch1017: 0017-single-load-segment.patch
  24. Patch1019: 0019-gcc-10-compatibility.patch
  25. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  26. ExclusiveArch: %{ix86} x86_64
  27. BuildRequires: nasm, perl, netpbm-progs
  28. BuildRequires: libuuid-devel
  29. %ifarch x86_64
  30. BuildRequires: gnu-efi-devel
  31. BuildRequires: compat32-glibc-devel
  32. %endif
  33. Requires: mtools
  34. %description
  35. SYSLINUX is a suite of bootloaders, currently supporting DOS FAT filesystems,
  36. Linux ext2/ext3 filesystems (EXTLINUX), PXE network boots
  37. (PXELINUX), or ISO 9660 CD-ROMs (ISOLINUX). It also includes a tool,
  38. MEMDISK, which loads legacy operating systems from these media.
  39. %description -l ja
  40. SYSLINUX はカーネルローダー集です。現在は FAT ファイルシステム、Linux の
  41. ext2/ext3 ファイルシステム(EXTLINUX)、PXE ネットワークブート (PXELINUX) および
  42. ISO 9660 CDROM (ISOLINUX) に対応しています。
  43. %package perl
  44. Summary: Syslinux tools written in perl
  45. Summary(ja): Syslinux の perl ツール集
  46. Group: admin-tools
  47. %description perl
  48. Syslinux tools written in perl
  49. %package devel
  50. Summary: Headers and libraries for syslinux development.
  51. Summary(ja): Syslinux 開発用ヘッダとライブラリ
  52. Group: programming
  53. %description devel
  54. Headers and libraries for syslinux development.
  55. %package extlinux
  56. Summary: The EXTLINUX bootloader, for booting the local system.
  57. Summary(ja): EXTLINUX ブートローダ
  58. Group: system
  59. Requires: syslinux
  60. %description extlinux
  61. The EXTLINUX bootloader, for booting the local system, as well as all
  62. the SYSLINUX/PXELINUX modules in /boot.
  63. %package tftpboot
  64. Summary: SYSLINUX modules in /tftpboot, available for network booting
  65. Summary(ja): ネットワークブート用 SYSLINUX モジュール
  66. Group: system,network
  67. Requires: syslinux
  68. %description tftpboot
  69. All the SYSLINUX/PXELINUX modules directly available for network
  70. booting in the /tftpboot directory.
  71. %debug_package
  72. %prep
  73. %setup -q -n syslinux-%{version}%{?pre_relase:-%{pre_relase}}
  74. %autopatch -p1
  75. sed -i -e '/CORELIBOBJS =/a calloc.o \\' mk/lib.mk
  76. %ifarch x86_64
  77. sed -i -e 's|/crt0-efi-|/gnuefi/crt0-efi-|' mk/efi.mk
  78. sed -i -e "s|-lefi||" efi/Makefile
  79. sed -i -e '/make/d' efi/clean-gnu-efi.sh
  80. sed -i -e 's|&load_error_buf|load_error_buf|' efi/main.c
  81. %endif
  82. %build
  83. CFLAGS32="$(echo '%{build_cflags}' | sed -e 's/-m64 -mtune=generic//' -e 's/-fcf-protection//')"
  84. make OPTFLAGS="${CFLAGS32}" bios
  85. make OPTFLAGS="${CFLAGS32}" bios all ||:
  86. %ifarch x86_64
  87. make OPTFLAGS="%{build_cflags}" efi64
  88. %endif
  89. %install
  90. mkdir -p %{buildroot}%{_bindir}
  91. mkdir -p %{buildroot}%{_sbindir}
  92. mkdir -p %{buildroot}%{_syssbindir}
  93. mkdir -p %{buildroot}%{_libdir}/syslinux
  94. mkdir -p %{buildroot}%{_includedir}
  95. make bios install netinstall \
  96. INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_syssbindir} \
  97. LIBDIR=%{_prefix}/lib DATADIR=%{_datadir} \
  98. MANDIR=%{_mandir} INCDIR=%{_includedir} \
  99. TFTPBOOT=/tftpboot EXTLINUXDIR=/boot/extlinux \
  100. LDLINUX=ldlinux.c32
  101. make bios extbootinstall \
  102. INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_syssbindir} \
  103. LIBDIR=%{_prefix}/lib DATADIR=%{_datadir} \
  104. MANDIR=%{_mandir} INCDIR=%{_includedir} \
  105. TFTPBOOT=/tftpboot EXTLINUXDIR=/boot/extlinux \
  106. LDLINUX=ldlinux.c32 ||:
  107. %ifarch x86_64
  108. make efi64 install netinstall \
  109. INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_syssbindir} \
  110. LIBDIR=%{_prefix}/lib DATADIR=%{_datadir} \
  111. MANDIR=%{_mandir} INCDIR=%{_includedir} \
  112. TFTPBOOT=/tftpboot EXTLINUXDIR=/boot/extlinux \
  113. LDLINUX=ldlinux.c32
  114. %endif
  115. #install -m 755 linux/syslinux-nomtools %{buildroot}%{_datadir}/syslinux
  116. #install -m 755 linux/syslinux %{buildroot}%{_datadir}/syslinux
  117. mkdir -p %{buildroot}/%{_pkgdocdir}/sample
  118. install -m 644 sample/sample.* %{buildroot}/%{_pkgdocdir}/sample/
  119. mkdir -p %{buildroot}/etc
  120. ( cd %{buildroot}/etc && ln -s ../boot/extlinux/extlinux.conf . )
  121. # don't ship libsyslinux, at least, not for now
  122. rm -f %{buildroot}%{_prefix}/lib/libsyslinux*
  123. rm -f %{buildroot}%{_includedir}/syslinux.h
  124. %post extlinux
  125. # If we have a /boot/extlinux.conf file, assume extlinux is our bootloader
  126. # and update it.
  127. if [ -f /boot/extlinux/extlinux.conf ]; then \
  128. extlinux --update /boot/extlinux ; \
  129. elif [ -f /boot/extlinux.conf ]; then \
  130. mkdir -p /boot/extlinux && \
  131. mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && \
  132. extlinux --update /boot/extlinux ; \
  133. fi
  134. %files
  135. %defattr(-,root,root)
  136. %license COPYING
  137. %doc NEWS README*
  138. %doc doc/*
  139. %doc sample
  140. %{_mandir}/man1/gethostip*
  141. %{_mandir}/man1/syslinux*
  142. %{_mandir}/man1/extlinux*
  143. %{_mandir}/man1/isohybrid*
  144. %{_mandir}/man1/memdiskfind*
  145. %{_bindir}/gethostip
  146. %{_bindir}/isohybrid
  147. %{_bindir}/memdiskfind
  148. %{_bindir}/syslinux
  149. %dir %{_datadir}/syslinux
  150. %dir %{_datadir}/syslinux/dosutil
  151. %{_datadir}/syslinux/dosutil/*
  152. %dir %{_datadir}/syslinux/diag
  153. %{_datadir}/syslinux/diag/*
  154. %ifarch x86_64
  155. %{_datadir}/syslinux/efi64
  156. %endif
  157. %{_datadir}/syslinux/*.com
  158. %{_datadir}/syslinux/*.c32
  159. %{_datadir}/syslinux/*.bin
  160. %{_datadir}/syslinux/*.0
  161. %{_datadir}/syslinux/memdisk
  162. %files perl
  163. %defattr(-,root,root)
  164. %{_mandir}/man1/lss16toppm*
  165. %{_mandir}/man1/ppmtolss16*
  166. %{_mandir}/man1/syslinux2ansi*
  167. %{_bindir}/keytab-lilo
  168. %{_bindir}/lss16toppm
  169. %{_bindir}/md5pass
  170. %{_bindir}/mkdiskimage
  171. %{_bindir}/ppmtolss16
  172. %{_bindir}/pxelinux-options
  173. %{_bindir}/sha1pass
  174. %{_bindir}/syslinux2ansi
  175. %{_bindir}/isohybrid.pl
  176. %files devel
  177. %defattr(-,root,root)
  178. %dir %{_datadir}/syslinux/com32
  179. %{_datadir}/syslinux/com32/*
  180. %files extlinux
  181. %{_syssbindir}/extlinux
  182. %config /etc/extlinux.conf
  183. /boot/extlinux
  184. %files tftpboot
  185. /tftpboot
  186. %changelog
  187. * Thu Mar 25 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.04-1
  188. - new upstream release.
  189. - imported Patch0 from upstream.
  190. - imported Patch100 from upstream PR.
  191. - imported Patch1004-1019 from debian.
  192. * Sun Oct 12 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.07-1
  193. - updated to 4.07
  194. - moved extlinux subpackage to Applications/System Group
  195. * Mon Feb 27 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 4.05-1
  196. - update to 4.05
  197. - add BR: libuuid-devel
  198. * Mon Jun 06 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 4.04-1
  199. - update to 4.04
  200. * Tue Jan 11 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.03-1
  201. - new upstream release
  202. * Sun Sep 26 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.02-2
  203. - remove Obsoletes: syslinux-devel
  204. * Sat Sep 25 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.02-1
  205. - new upstream release
  206. - split out -devel/perl/extlinux/tftpboot subpackages
  207. * Sat Nov 28 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.83-1
  208. - new upstream release
  209. * Fri Jun 12 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.82-1
  210. - new upstream release w/ bugfixes
  211. * Thu May 14 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.80-1
  212. - new upstream release 3.80 w/ dozens of bugfixes and new features :)
  213. * Thu Dec 11 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.63-3
  214. - add missing files to the filelist
  215. * Fri May 23 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.63-2
  216. - spec in UTF-8
  217. * Mon May 19 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.63-1
  218. - updated to new upstream release
  219. * Wed Nov 21 2007 Shu KONNO <owa@bg.wakwak.com> 3.53-0vl1
  220. - new upstream source
  221. * Wed May 18 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 3.07-0vl1
  222. - new upstream source
  223. - add extlinux
  224. - remove and obsolete syslinux-devel
  225. * Fri Dec 17 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13-0vl1
  226. - new upstream release
  227. * Fri Jun 25 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10-0vl1
  228. - new upstream release
  229. * Tue Mar 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.52-2vl1
  230. - rebuild for Vine Linux
  231. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  232. - Bump release + rebuild.
  233. * Sat Feb 10 2001 Matt Wilson <msw@redhat.com>
  234. - 1.52
  235. * Wed Jan 24 2001 Matt Wilson <msw@redhat.com>
  236. - 1.51pre7
  237. * Mon Jan 22 2001 Matt Wilson <msw@redhat.com>
  238. - 1.51pre5
  239. * Fri Jan 19 2001 Matt Wilson <msw@redhat.com>
  240. - 1.51pre3, with e820 detection
  241. * Tue Dec 12 2000 Than Ngo <than@redhat.com>
  242. - rebuilt with fixed fileutils
  243. * Thu Nov 9 2000 Than Ngo <than@redhat.com>
  244. - update to 1.49
  245. - update ftp site
  246. - clean up specfile
  247. - add some useful documents
  248. * Tue Jul 18 2000 Nalin Dahyabhai <nalin@redhat.com>
  249. - add %%defattr (release 4)
  250. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  251. - automatic rebuild
  252. * Thu Jul 06 2000 Trond Eivind Glomsr藷?<teg@redhat.com>
  253. - use %%{_tmppath}
  254. - change application group (Applications/Internet doesn't seem
  255. right to me)
  256. - added BuildRequires
  257. * Tue Apr 04 2000 Erik Troan <ewt@redhat.com>
  258. - initial packaging