eudev-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define debug false
  3. %define udev_scriptdir /lib/udev
  4. %define firmwaredir /lib/firmware
  5. Summary: A userspace implementation of devfs
  6. Summary(ja): ユーザスペース実装のデバイスファイルシステム
  7. Name: eudev
  8. Version: 3.2
  9. Release: 1%{?_dist_release}
  10. License: GPL
  11. Group: System Environment/Base
  12. URL: https://github.com/gentoo/eudev
  13. Source: http://dev.gentoo.org/~blueness/%{name}/%{name}-%{version}.tar.gz
  14. Source1: start_udev
  15. Source3: udev-post.init
  16. Source4: fw_unit_symlinks.sh
  17. Source5: udev.sysconfig
  18. # vine patch
  19. Patch1002: eudev-3.0-blkid.patch
  20. Patch1003: eudev-3.1.1-rules-vine.patch
  21. ExclusiveOS: Linux
  22. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  23. BuildRequires: sed, flex
  24. BuildRequires: pam-devel, glib2-devel, bison
  25. BuildRequires: findutils
  26. BuildRequires: hwdata
  27. BuildRequires: gobject-introspection-devel >= 1.31.1
  28. BuildRequires: gtk-doc
  29. BuildRequires: usbutils >= 0.82
  30. BuildRequires: gperf
  31. BuildRequires: libacl-devel
  32. BuildRequires: libusb-devel
  33. BuildRequires: kmod-devel
  34. BuildRequires: libblkid-devel >= 2.20
  35. Requires(pre): /bin/sh fileutils
  36. Requires(pre): MAKEDEV >= 3.21
  37. Requires: %{name}-libudev = %{version}-%{release}
  38. Requires: MAKEDEV >= 3.21
  39. Requires: util-linux-ng >= 2.16
  40. Obsoletes: udev < 220
  41. Provides: udev = 220
  42. Obsoletes: dev < 3.22
  43. Conflicts: dev < 3.22
  44. Provides: dev = 3.22
  45. Obsoletes: murasaki, usbmgr, hotplug, hal, hal-info
  46. Requires: pam
  47. Vendor: Project Vine
  48. Distribution: Vine Linux
  49. Packager: daisuke, Takemikaduchi
  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 Environment/Libraries
  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: Development/Libraries
  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: Development/Libraries
  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 Environment/Libraries
  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: Development/Libraries
  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. %prep
  101. %setup -q
  102. %patch1002 -p1 -b .vine
  103. %patch1003 -p1 -b .vine
  104. %build
  105. NOCONFIGURE=1 ./autogen.sh
  106. %configure \
  107. --disable-selinux \
  108. --prefix=%{_prefix} \
  109. --with-rootprefix= \
  110. --sysconfdir=%{_sysconfdir} \
  111. --exec-prefix="" \
  112. --bindir="/sbin" \
  113. --sbindir="/sbin" \
  114. --libexecdir=/lib \
  115. --with-rootlibdir=/%{_lib} \
  116. --with-rootlibexecdir=/lib/udev \
  117. --enable-introspection \
  118. --enable-manpages \
  119. --enable-static
  120. make %{?_smp_mflags}
  121. %install
  122. rm -rf $RPM_BUILD_ROOT
  123. mkdir -p $RPM_BUILD_ROOT%{_sbindir}
  124. make DESTDIR=$RPM_BUILD_ROOT install
  125. rm -fr $RPM_BUILD_ROOT%{_docdir}/udev
  126. rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
  127. rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules
  128. rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev
  129. rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug
  130. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices}
  131. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d
  132. mkdir -p $RPM_BUILD_ROOT%{_bindir}
  133. touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config
  134. # force relative symlinks
  135. ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id
  136. ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo
  137. ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest
  138. ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor
  139. ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevtrigger
  140. ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevsettle
  141. ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevcontrol
  142. mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
  143. for i in \
  144. %ifarch ppc ppc64
  145. rules/arch/40-ppc.rules \
  146. %endif
  147. ; do
  148. install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}"
  149. done
  150. mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
  151. install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh
  152. mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev
  153. install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev
  154. mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir}
  155. mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
  156. cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf <<EOF
  157. alias pnp:dPNP0700 floppy
  158. alias acpi:PNP0700: floppy
  159. EOF
  160. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
  161. install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post
  162. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
  163. install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev
  164. mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d
  165. %pre
  166. getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || :
  167. getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || :
  168. getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || :
  169. getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || :
  170. getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || :
  171. %preun
  172. if [ $1 = 0 -a -f %{_initrddir}/udev ]; then
  173. if [ -x /sbin/pidof ]; then
  174. pid=$(/sbin/pidof udevd)
  175. if [ -n "$pid" ]; then
  176. kill $pid
  177. fi
  178. fi
  179. /sbin/chkconfig --del udev
  180. fi
  181. if [ "$1" = 0 ]; then
  182. /sbin/chkconfig --del udev-post
  183. fi
  184. exit 0
  185. %post
  186. if [ "$1" -ge "1" -a -x /sbin/pidof ]; then
  187. pid=$(/sbin/pidof udevd)
  188. if [ -n "$pid" ]; then
  189. kill $pid
  190. /sbin/udevd -d
  191. fi
  192. fi
  193. exit 0
  194. %posttrans
  195. udevadm hwdb --update > /dev/null 2>&1 || :
  196. /sbin/chkconfig --add udev-post
  197. %triggerpostun -- dev <= 0:3.21-1vl1
  198. if [ $2 = 0 ]; then
  199. if [ -x /sbin/MAKEDEV ]; then
  200. /sbin/MAKEDEV null
  201. /sbin/MAKEDEV console
  202. else
  203. /bin/mknod /dev/null c 1 3
  204. /bin/mknod /dev/console c 5 1
  205. fi
  206. if [ "$(/sbin/kernelversion)" == "2.6" ] &&
  207. [ $(($(uname -r |cut -f1 -d-|cut -f3 -d.))) -gt 15 ]
  208. then
  209. /sbin/start_udev >/dev/null 2>&1
  210. if [ -e /dev/mapper/control -a -x /sbin/lvm ]; then
  211. /sbin/lvm vgmknodes >/dev/null 2>&1
  212. fi
  213. fi
  214. fi
  215. exit 0
  216. %post libudev -p /sbin/ldconfig
  217. %postun libudev -p /sbin/ldconfig
  218. %if %{build_compat32}
  219. %post -n compat32-%{name}-libudev -p /sbin/ldconfig
  220. %postun -n compat32-%{name}-libudev -p /sbin/ldconfig
  221. %endif
  222. %clean
  223. rm -rf $RPM_BUILD_ROOT
  224. %files
  225. %defattr(-,root,root)
  226. %doc COPYING README
  227. %attr(0755,root,root) /sbin/udevadm
  228. %attr(0755,root,root) /sbin/udevd
  229. %attr(0755,root,root) /sbin/start_udev
  230. /sbin/udevcontrol
  231. /sbin/udevtrigger
  232. /sbin/udevsettle
  233. /sbin/scsi_id
  234. %attr(0755,root,root) %{udev_scriptdir}/ata_id
  235. %attr(0755,root,root) %{udev_scriptdir}/cdrom_id
  236. %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh
  237. %attr(0755,root,root) %{udev_scriptdir}/collect
  238. %attr(0755,root,root) %{udev_scriptdir}/mtd_probe
  239. %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post
  240. %{_bindir}/udevtest
  241. %{_bindir}/udevinfo
  242. %{_sbindir}/udevmonitor
  243. %attr(0755,root,root) %dir %{_sysconfdir}/udev/
  244. %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/
  245. %attr(0755,root,root) %dir %{udev_scriptdir}/
  246. %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/
  247. %attr(0755,root,root) %dir %{udev_scriptdir}/devices/
  248. %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/
  249. %dir %{_sysconfdir}/udev/hwdb.d
  250. %{_sysconfdir}/udev/hwdb.d/20-OUI.hwdb
  251. %{_sysconfdir}/udev/hwdb.d/20-acpi-vendor.hwdb
  252. %{_sysconfdir}/udev/hwdb.d/20-bluetooth-vendor-product.hwdb
  253. %{_sysconfdir}/udev/hwdb.d/20-net-ifname.hwdb
  254. %{_sysconfdir}/udev/hwdb.d/20-pci-classes.hwdb
  255. %{_sysconfdir}/udev/hwdb.d/20-pci-vendor-model.hwdb
  256. %{_sysconfdir}/udev/hwdb.d/20-sdio-classes.hwdb
  257. %{_sysconfdir}/udev/hwdb.d/20-sdio-vendor-model.hwdb
  258. %{_sysconfdir}/udev/hwdb.d/20-usb-classes.hwdb
  259. %{_sysconfdir}/udev/hwdb.d/20-usb-vendor-model.hwdb
  260. %{_sysconfdir}/udev/hwdb.d/60-evdev.hwdb
  261. %{_sysconfdir}/udev/hwdb.d/60-keyboard.hwdb
  262. %{_sysconfdir}/udev/hwdb.d/70-mouse.hwdb
  263. %{_sysconfdir}/udev/hwdb.d/70-pointingstick.hwdb
  264. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev
  265. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf
  266. %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules
  267. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config
  268. %config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf
  269. %dir %attr(0755,root,root) %{firmwaredir}
  270. %{_mandir}/man8/udev*.8*
  271. %{_mandir}/man7/udev*.7*
  272. %{_mandir}/man5/udev*.5*
  273. %dir %attr(0755,root,root) /var/lib/udev
  274. %dir %attr(0755,root,root) /var/lib/udev/makedev.d
  275. # Deprecated, but keep the ownership
  276. %ghost %dir %{_sysconfdir}/udev/scripts/
  277. %ghost %dir %{_sysconfdir}/udev/devices/
  278. %ghost %dir %{_sysconfdir}/dev.d/
  279. %attr(0755,root,root) %{udev_scriptdir}/scsi_id
  280. %attr(0755,root,root) %{udev_scriptdir}/v4l_id
  281. %files libudev
  282. %defattr(-,root,root,-)
  283. /%{_lib}/libudev.so.*
  284. %files libudev-devel
  285. %defattr(-,root,root,-)
  286. %doc COPYING
  287. %{_includedir}/libudev.h
  288. %{_includedir}/udev.h
  289. %{_libdir}/libudev.so
  290. %{_libdir}/pkgconfig/libudev.pc
  291. %{_datadir}/pkgconfig/udev.pc
  292. %files libudev-static
  293. %defattr(-,root,root,-)
  294. %{_libdir}/libudev.a
  295. %if %{build_compat32}
  296. %files -n compat32-%{name}-libudev
  297. %defattr(-,root,root,-)
  298. /%{_lib}/libudev.so.*
  299. %files -n compat32-%{name}-libudev-devel
  300. %defattr(-,root,root,-)
  301. %{_libdir}/libudev.so
  302. %endif
  303. %changelog
  304. * Sun Jun 19 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2-1
  305. - new upstream release
  306. - remove Patch0 (eudev-3.1.5-git20160322.patch)
  307. * Sun Apr 24 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.5-1
  308. - new upstream release
  309. - add Patch0 (eudev-3.1.5-git20160322.patch)
  310. - remove Patch1001 (eudev-1.7-gudev-vine.patch)
  311. - remove libgudev1,libgudev1-devel subpackages
  312. * Thu Nov 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.2-2
  313. - fix spec file
  314. * Sun Jun 28 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.2-1
  315. - new upstream release
  316. * Wed Jun 10 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.1-1
  317. - new upstream release
  318. - update Patch1003 (eudev-3.1.1-rules-vine.patch)
  319. * Sun May 24 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0-2
  320. - add Patch1003 (eudev-3.0-rules-vine.patch)
  321. * Sun May 24 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0-1
  322. - new upstream release
  323. - add Patch1002 (eudev-3.0-blkid.patch)
  324. * Sun Feb 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.1-2
  325. - fix SOURCE1 (remove udevadm trigger --type=failed)
  326. * Tue Nov 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.1-1
  327. - new upstream release
  328. * Tue Oct 14 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.10-2
  329. - added Japanese summary
  330. - added %%post and %%postun section to library subpackages
  331. - changed Group of libgudev1, compat32-eudev-libudev and compat32-eudev-libgudev1
  332. * Sun Aug 31 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10-1
  333. - new upstream release
  334. * Fri Jun 27 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8-1
  335. - new upstream release
  336. * Wed Jun 25 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7-1
  337. - initial build for Vine Linux based on udev package