eudev-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define debug false
  3. %define udev_scriptdir /usr/lib/udev
  4. %define firmwaredir /usr/lib/firmware
  5. Summary: A userspace implementation of devfs
  6. Summary(ja): ユーザスペース実装のデバイスファイルシステム
  7. Name: eudev
  8. Version: 3.2.14
  9. Release: 1%{?_dist_release}
  10. License: GPL
  11. Group: system
  12. Vendor: Project Vine
  13. Distribution: Vine Linux
  14. Packager: daisuke
  15. URL: https://github.com/eudev-project/eudev
  16. Source: https://github.com/eudev-project/eudev/releases/download/v%{version}/%{name}-%{version}.tar.gz
  17. Source1: start_udev
  18. Source3: udev-post.init
  19. Source4: fw_unit_symlinks.sh
  20. Source5: udev.sysconfig
  21. # vine patch
  22. Patch1002: eudev-3.0-blkid.patch
  23. Patch1003: eudev-3.1.1-rules-vine.patch
  24. ExclusiveOS: Linux
  25. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  26. BuildRequires: sed, flex
  27. BuildRequires: pam-devel, glib2-devel, bison
  28. BuildRequires: findutils
  29. BuildRequires: hwdata
  30. BuildRequires: gobject-introspection-devel >= 1.31.1
  31. BuildRequires: gtk-doc
  32. BuildRequires: usbutils >= 0.82
  33. BuildRequires: gperf
  34. BuildRequires: libacl-devel
  35. BuildRequires: libusb-devel
  36. BuildRequires: kmod-devel
  37. BuildRequires: libblkid-devel >= 2.20
  38. Requires(pre): /bin/sh fileutils
  39. Requires(pre): MAKEDEV >= 3.21
  40. Requires: %{name}-libudev = %{version}-%{release}
  41. Requires: MAKEDEV >= 3.21
  42. Requires: util-linux-ng >= 2.16
  43. Obsoletes: udev < 220
  44. Provides: udev = 220
  45. Obsoletes: dev < 3.22
  46. Conflicts: dev < 3.22
  47. Provides: dev = 3.22
  48. Obsoletes: murasaki, usbmgr, hotplug, hal, hal-info
  49. Requires: pam
  50. %description
  51. The udev package contains an implementation of devfs in
  52. userspace using sysfs and netlink.
  53. %package libudev
  54. Summary: Dynamic library to access udev device information
  55. Summary(ja): Udev デバイス情報にアクセスするための動的ライブラリ
  56. Group: system
  57. %description libudev
  58. This package contains the dynamic library libudev, which provides access
  59. to udev device information, and an interface to search devices in sysfs.
  60. %package libudev-devel
  61. Summary: Development files for libudev
  62. Summary(ja): Libudev の開発用ファイル
  63. Group: programming
  64. Requires: %{name} = %{version}-%{release}
  65. Requires: %{name}-libudev = %{version}-%{release}
  66. Obsoletes: libudev-devel < 213
  67. Provides: libudev-devel = 213
  68. %description libudev-devel
  69. This package contains the development files for the library libudev, a
  70. dynamic library, which provides access to udev device information.
  71. %package libudev-static
  72. Summary: Static libraries for libudev
  73. Summary(ja): Libudev の静的ライブラリ
  74. Group: programming
  75. Requires: %{name}-libudev-devel = %{version}-%{release}
  76. Obsoletes: libudev-static < 213
  77. Provides: libudev-static = 213
  78. %description libudev-static
  79. This package contains the static library libudev, which provides
  80. access to udev device information.
  81. # compat32
  82. %package -n compat32-%{name}-libudev
  83. Summary: Dynamic library to access udev device information
  84. Summary(ja): Udev デバイス情報にアクセスするための動的ライブラリ
  85. Group: system
  86. Requires: %{name}-libudev = %{version}-%{release}
  87. %description -n compat32-%{name}-libudev
  88. This package contains the dynamic library libudev, which provides access
  89. to udev device information, and an interface to search devices in sysfs.
  90. %package -n compat32-%{name}-libudev-devel
  91. Summary: Development files for libudev
  92. Summary(ja): Libudev の開発用ファイル
  93. Group: programming
  94. Requires: compat32-%{name}-libudev = %{version}-%{release}
  95. Obsoletes: compat32-libudev-devel < 213
  96. Provides: compat32-libudev-devel = 213
  97. %description -n compat32-%{name}-libudev-devel
  98. This package contains the development files for the library libudev, a
  99. dynamic library, which provides access to udev device information.
  100. %debug_package
  101. %prep
  102. %setup -q
  103. %patch1002 -p1 -b .blkid
  104. %patch1003 -p1 -b .vine
  105. %build
  106. autoreconf -if
  107. %configure \
  108. --disable-selinux \
  109. --prefix=%{_prefix} \
  110. --sysconfdir=%{_sysconfdir} \
  111. --bindir="%{_sbindir}" \
  112. --sbindir="%{_sbindir}" \
  113. --libexecdir=%{_libexecdir} \
  114. --with-rootlibdir=%{_libdir} \
  115. --with-rootlibexecdir=/usr/lib/udev \
  116. --enable-introspection \
  117. --enable-manpages \
  118. --enable-static
  119. make %{?_smp_mflags}
  120. %install
  121. rm -rf %{buildroot}
  122. mkdir -p %{buildroot}%{_sbindir}
  123. make DESTDIR=%{buildroot} install
  124. rm -fr %{buildroot}%{_docdir}/udev
  125. rm -f %{buildroot}/%{_libdir}/*.la
  126. rm -f %{buildroot}%{_sysconfdir}/udev/udev.rules
  127. rm -f %{buildroot}%{_sysconfdir}/init.d/udev
  128. rm -f %{buildroot}%{_sysconfdir}/hotplug.d/default/10-udev.hotplug
  129. mkdir -p %{buildroot}%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices}
  130. mkdir -p %{buildroot}%{_sysconfdir}/dev.d
  131. mkdir -p %{buildroot}%{_bindir}
  132. touch %{buildroot}%{_sysconfdir}/scsi_id.config
  133. # force relative symlinks
  134. ln -sf ../lib/udev/scsi_id %{buildroot}%{_sbindir}/scsi_id
  135. ln -sf ../sbin/udevadm %{buildroot}%{_bindir}/udevinfo
  136. ln -sf ../sbin/udevadm %{buildroot}%{_bindir}/udevtest
  137. ln -sf udevadm %{buildroot}%{_sbindir}/udevmonitor
  138. ln -sf udevadm %{buildroot}%{_sbindir}/udevtrigger
  139. ln -sf udevadm %{buildroot}%{_sbindir}/udevsettle
  140. ln -sf udevadm %{buildroot}%{_sbindir}/udevcontrol
  141. mkdir -p %{buildroot}%{udev_scriptdir}/{,devices}
  142. for i in \
  143. %ifarch ppc ppc64
  144. rules/arch/40-ppc.rules \
  145. %endif
  146. ; do
  147. install -m 0644 "$i" "%{buildroot}%{udev_scriptdir}/rules.d/${i##*/}"
  148. done
  149. mkdir -p %{buildroot}%{udev_scriptdir}/{,devices}
  150. install -m 0755 %{SOURCE4} %{buildroot}%{udev_scriptdir}/fw_unit_symlinks.sh
  151. mkdir -p %{buildroot}%{_datadir}/udev
  152. install -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/start_udev
  153. mkdir -p -m 0755 %{buildroot}%{firmwaredir}
  154. mkdir -p -m 0755 %{buildroot}%{_sysconfdir}/modprobe.d
  155. cat > %{buildroot}%{_sysconfdir}/modprobe.d/floppy-pnp.conf <<EOF
  156. alias pnp:dPNP0700 floppy
  157. alias acpi:PNP0700: floppy
  158. EOF
  159. mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
  160. install -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/rc.d/init.d/udev-post
  161. mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
  162. install -m 0755 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/udev
  163. mkdir -p %{buildroot}/var/lib/udev/makedev.d
  164. %pre
  165. getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || :
  166. getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || :
  167. getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || :
  168. getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || :
  169. getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || :
  170. if [ ! -L /lib -a -d /lib/udev -a ! -d /usr/lib/udev ]; then
  171. cp -af /lib/udev /usr/lib/udev && \
  172. mv -f /lib/udev /lib/udev.old && \
  173. ln -sf ../usr/lib/udev /lib/udev && \
  174. rm -rf /lib/udev.old
  175. fi
  176. if [ ! -e /lib/udev ]; then
  177. ln -sf ../usr/lib/udev /lib/udev
  178. fi
  179. if [ ! -L /lib -a -d /lib/firmware -a ! -d /usr/lib/firmware ]; then
  180. cp -af /lib/firmware /usr/lib/firmware && \
  181. mv -f /lib/firmware /lib/firmware.old && \
  182. ln -sf ../usr/lib/firmware /lib/firmware && \
  183. rm -rf /lib/firmware.old
  184. fi
  185. if [ ! -e /lib/firmware ]; then
  186. ln -sf ../usr/lib/firmware /lib/firmware
  187. fi
  188. %preun
  189. if [ $1 = 0 -a -f %{_initrddir}/udev ]; then
  190. if [ -x /sbin/pidof ]; then
  191. pid=$(/sbin/pidof udevd)
  192. if [ -n "$pid" ]; then
  193. kill $pid
  194. fi
  195. fi
  196. /sbin/chkconfig --del udev
  197. fi
  198. if [ "$1" = 0 ]; then
  199. /sbin/chkconfig --del udev-post
  200. fi
  201. exit 0
  202. %postun
  203. if [ "$1" = 0 ]; then
  204. rm -f /sbin/scsi_id
  205. rm -f /sbin/start_udev
  206. rm -f /sbin/udevd
  207. rm -f /sbin/udevadm
  208. rm -f /sbin/udevcontrol
  209. rm -f /sbin/udevtrigger
  210. rm -f /sbin/udevsettle
  211. fi
  212. exit 0
  213. %post
  214. if [ "$1" -ge "1" -a -x /sbin/pidof ]; then
  215. pid=$(/sbin/pidof udevd)
  216. if [ -n "$pid" ]; then
  217. kill $pid
  218. /sbin/udevd -d
  219. fi
  220. fi
  221. exit 0
  222. %triggerpostun -- %{name} < 3.2.14-1
  223. if [ -d /bin -a ! -L /bin ]; then
  224. if [ ! -L /sbin/udevadm ]; then
  225. ln -sf ../../%{udev_scriptdir}/scsi_id /sbin/scsi_id
  226. ln -sf ../usr/sbin/start_udev /sbin/start_udev
  227. ln -sf ../usr/sbin/udevd /sbin/udevd
  228. ln -sf ../usr/sbin/udevadm /sbin/udevadm
  229. ln -sf ../usr/sbin/udevadm /sbin/udevcontrol
  230. ln -sf ../usr/sbin/udevadm /sbin/udevtrigger
  231. ln -sf ../usr/sbin/udevadm /sbin/udevsettle
  232. fi
  233. fi
  234. if [ ! -e /lib/udev ]; then
  235. ln -sf ../usr/lib/udev /lib/udev
  236. fi
  237. if [ ! -e /lib/firmware ]; then
  238. ln -sf ../usr/lib/firmware /lib/firmware
  239. fi
  240. %posttrans
  241. udevadm hwdb --update > /dev/null 2>&1 || :
  242. /sbin/chkconfig --add udev-post
  243. if [ -d /bin -a ! -L /bin ]; then
  244. if [ ! -L /sbin/udevadm ]; then
  245. ln -sf ../../%{udev_scriptdir}/scsi_id /sbin/scsi_id
  246. ln -sf ../usr/sbin/start_udev /sbin/start_udev
  247. ln -sf ../usr/sbin/udevd /sbin/udevd
  248. ln -sf ../usr/sbin/udevadm /sbin/udevadm
  249. ln -sf ../usr/sbin/udevadm /sbin/udevcontrol
  250. ln -sf ../usr/sbin/udevadm /sbin/udevtrigger
  251. ln -sf ../usr/sbin/udevadm /sbin/udevsettle
  252. fi
  253. fi
  254. if [ ! -e /lib/udev ]; then
  255. ln -sf ../usr/lib/udev /lib/udev
  256. fi
  257. if [ ! -e /lib/firmware ]; then
  258. ln -sf ../usr/lib/firmware /lib/firmware
  259. fi
  260. %triggerpostun -- dev <= 0:3.21-1vl1
  261. if [ $2 = 0 ]; then
  262. if [ -x /sbin/MAKEDEV ]; then
  263. /sbin/MAKEDEV null
  264. /sbin/MAKEDEV console
  265. else
  266. /bin/mknod /dev/null c 1 3
  267. /bin/mknod /dev/console c 5 1
  268. fi
  269. if [ "$(/sbin/kernelversion)" == "2.6" ] &&
  270. [ $(($(uname -r |cut -f1 -d-|cut -f3 -d.))) -gt 15 ]
  271. then
  272. /sbin/start_udev >/dev/null 2>&1
  273. if [ -e /dev/mapper/control -a -x /sbin/lvm ]; then
  274. /sbin/lvm vgmknodes >/dev/null 2>&1
  275. fi
  276. fi
  277. fi
  278. exit 0
  279. %files
  280. %defattr(-,root,root)
  281. %license COPYING
  282. %doc README
  283. %attr(0755,root,root) %{_sbindir}/udevadm
  284. %attr(0755,root,root) %{_sbindir}/udevd
  285. %attr(0755,root,root) %{_sbindir}/start_udev
  286. %{_sbindir}/udevcontrol
  287. %{_sbindir}/udevtrigger
  288. %{_sbindir}/udevsettle
  289. %{_sbindir}/scsi_id
  290. %attr(0755,root,root) %{udev_scriptdir}/ata_id
  291. %attr(0755,root,root) %{udev_scriptdir}/cdrom_id
  292. %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh
  293. %attr(0755,root,root) %{udev_scriptdir}/collect
  294. %attr(0755,root,root) %{udev_scriptdir}/mtd_probe
  295. %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post
  296. %{_bindir}/udevtest
  297. %{_bindir}/udevinfo
  298. %{_sbindir}/udevmonitor
  299. %attr(0755,root,root) %dir %{_sysconfdir}/udev/
  300. %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/
  301. %attr(0755,root,root) %dir %{udev_scriptdir}/
  302. %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/
  303. %attr(0755,root,root) %dir %{udev_scriptdir}/devices/
  304. %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/
  305. %dir %{_sysconfdir}/udev/hwdb.d
  306. %{_sysconfdir}/udev/hwdb.d/*.hwdb
  307. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev
  308. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf
  309. %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules
  310. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config
  311. %config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf
  312. %dir %attr(0755,root,root) %{firmwaredir}
  313. %{_mandir}/man8/udev*.8*
  314. %{_mandir}/man7/hwdb.7*
  315. %{_mandir}/man7/udev*.7*
  316. %{_mandir}/man5/udev*.5*
  317. %dir %attr(0755,root,root) /var/lib/udev
  318. %dir %attr(0755,root,root) /var/lib/udev/makedev.d
  319. # Deprecated, but keep the ownership
  320. %ghost %dir %{_sysconfdir}/udev/scripts/
  321. %ghost %dir %{_sysconfdir}/udev/devices/
  322. %ghost %dir %{_sysconfdir}/dev.d/
  323. %attr(0755,root,root) %{udev_scriptdir}/dmi_memory_id
  324. %attr(0755,root,root) %{udev_scriptdir}/fido_id
  325. %attr(0755,root,root) %{udev_scriptdir}/scsi_id
  326. %attr(0755,root,root) %{udev_scriptdir}/v4l_id
  327. %files libudev
  328. %defattr(-,root,root,-)
  329. %{_libdir}/libudev.so.*
  330. %files libudev-devel
  331. %defattr(-,root,root,-)
  332. %license COPYING
  333. %{_includedir}/libudev.h
  334. %{_includedir}/udev.h
  335. %{_libdir}/libudev.so
  336. %{_libdir}/pkgconfig/libudev.pc
  337. %{_datadir}/pkgconfig/udev.pc
  338. %files libudev-static
  339. %defattr(-,root,root,-)
  340. %{_libdir}/libudev.a
  341. %if %{build_compat32}
  342. %files -n compat32-%{name}-libudev
  343. %defattr(-,root,root,-)
  344. %{_libdir}/libudev.so.*
  345. %files -n compat32-%{name}-libudev-devel
  346. %defattr(-,root,root,-)
  347. %{_libdir}/libudev.so
  348. %endif
  349. %changelog
  350. * Tue Jul 02 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.14-1
  351. - new upstream release.
  352. - prepared usrmerge.
  353. * Thu Feb 25 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.10-1
  354. - new upstream release.
  355. * Wed Sep 18 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.8-1
  356. - new upstream release.
  357. * Sun Jun 19 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2-1
  358. - new upstream release
  359. - remove Patch0 (eudev-3.1.5-git20160322.patch)
  360. * Sun Apr 24 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.5-1
  361. - new upstream release
  362. - add Patch0 (eudev-3.1.5-git20160322.patch)
  363. - remove Patch1001 (eudev-1.7-gudev-vine.patch)
  364. - remove libgudev1,libgudev1-devel subpackages
  365. * Thu Nov 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.2-2
  366. - fix spec file
  367. * Sun Jun 28 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.2-1
  368. - new upstream release
  369. * Wed Jun 10 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.1-1
  370. - new upstream release
  371. - update Patch1003 (eudev-3.1.1-rules-vine.patch)
  372. * Sun May 24 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0-2
  373. - add Patch1003 (eudev-3.0-rules-vine.patch)
  374. * Sun May 24 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0-1
  375. - new upstream release
  376. - add Patch1002 (eudev-3.0-blkid.patch)
  377. * Sun Feb 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.1-2
  378. - fix SOURCE1 (remove udevadm trigger --type=failed)
  379. * Tue Nov 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.1-1
  380. - new upstream release
  381. * Tue Oct 14 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.10-2
  382. - added Japanese summary
  383. - added %%post and %%postun section to library subpackages
  384. - changed Group of libgudev1, compat32-eudev-libudev and compat32-eudev-libgudev1
  385. * Sun Aug 31 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10-1
  386. - new upstream release
  387. * Fri Jun 27 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8-1
  388. - new upstream release
  389. * Wed Jun 25 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7-1
  390. - initial build for Vine Linux based on udev package