eudev-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  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: 1.10
  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. Patch1001: eudev-1.7-gudev-vine.patch
  20. ExclusiveOS: Linux
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  22. BuildRequires: sed, flex
  23. BuildRequires: pam-devel, glib2-devel, bison
  24. BuildRequires: findutils
  25. BuildRequires: hwdata
  26. BuildRequires: gobject-introspection-devel >= 0.6.2
  27. BuildRequires: gtk-doc
  28. BuildRequires: usbutils >= 0.82
  29. BuildRequires: gperf
  30. BuildRequires: libacl-devel
  31. BuildRequires: libusb-devel
  32. BuildRequires: kmod-devel
  33. BuildRequires: libblkid-devel
  34. Requires(pre): /bin/sh fileutils
  35. Requires(pre): MAKEDEV >= 3.21
  36. Requires: %{name}-libudev = %{version}-%{release}
  37. Requires: MAKEDEV >= 3.21
  38. Requires: util-linux-ng >= 2.16
  39. Obsoletes: udev < 213
  40. Provides: udev = 213
  41. Obsoletes: dev < 3.22
  42. Conflicts: dev < 3.22
  43. Provides: dev = 3.22
  44. Obsoletes: murasaki, usbmgr, hotplug, hal, hal-info
  45. Requires: pam
  46. Vendor: Project Vine
  47. Distribution: Vine Linux
  48. Packager: daisuke, Takemikaduchi
  49. %description
  50. The udev package contains an implementation of devfs in
  51. userspace using sysfs and netlink.
  52. %package libudev
  53. Summary: Dynamic library to access udev device information
  54. Group: System Environment/Libraries
  55. %description libudev
  56. This package contains the dynamic library libudev, which provides access
  57. to udev device information, and an interface to search devices in sysfs.
  58. %package libudev-devel
  59. Summary: Development files for libudev
  60. Group: Development/Libraries
  61. Requires: %{name} = %{version}-%{release}
  62. Requires: %{name}-libudev = %{version}-%{release}
  63. Obsoletes: libudev-devel < 213
  64. Provides: libudev-devel = 213
  65. %description libudev-devel
  66. This package contains the development files for the library libudev, a
  67. dynamic library, which provides access to udev device information.
  68. %package libudev-static
  69. Summary: Static libraries for libudev
  70. Group: Development/Libraries
  71. Requires: %{name}-libudev-devel = %{version}-%{release}
  72. Obsoletes: libudev-static < 213
  73. Provides: libudev-static = 213
  74. %description libudev-static
  75. This package contains the static library libudev, which provides
  76. access to udev device information.
  77. %package libgudev1
  78. Summary: Libraries for adding libudev support to applications that use glib
  79. Group: Development/Libraries
  80. Requires: %{name}-libudev = %{version}-%{release}
  81. # remove the following lines for libgudev so major 1
  82. Obsoletes: libgudev <= 20090517
  83. Provides: libgudev = 20090518
  84. Obsoletes: libgudev1 < 213
  85. Provides: libgudev1 = 213
  86. %description libgudev1
  87. This package contains the libraries that make it easier to use libudev
  88. functionality from applications that use glib.
  89. %package libgudev1-devel
  90. Summary: Header files for adding libudev support to applications that use glib
  91. Group: Development/Libraries
  92. Requires: %{name}-libgudev1 = %{version}-%{release}
  93. Requires: %{name}-libudev-devel = %{version}-%{release}
  94. Obsoletes: libgudev-devel <= 20090517
  95. Provides: libgudev-devel = 20090518
  96. Obsoletes: libgudev1-devel < 213
  97. Provides: libgudev1-devel = 213
  98. %description libgudev1-devel
  99. This package contains the header and pkg-config files for developing
  100. glib-based applications using libudev functionality.
  101. # compat32
  102. %package -n compat32-%{name}-libudev
  103. Summary: A userspace implementation of devfs
  104. Summary(ja): ユーザスペース実装のデバイスファイルシステム
  105. Group: System Environment/Base
  106. Requires: %{name}-libudev = %{version}-%{release}
  107. %description -n compat32-%{name}-libudev
  108. The udev package contains an implementation of devfs in
  109. userspace using sysfs and netlink.
  110. %package -n compat32-%{name}-libudev-devel
  111. Summary: Development files for libudev
  112. Group: Development/Libraries
  113. Requires: compat32-%{name}-libudev = %{version}-%{release}
  114. Obsoletes: compat32-libudev-devel < 213
  115. Provides: compat32-libudev-devel = 213
  116. %description -n compat32-%{name}-libudev-devel
  117. This package contains the development files for the library libudev, a
  118. dynamic library, which provides access to udev device information.
  119. %package -n compat32-%{name}-libgudev1
  120. Summary: Libraries for adding libudev support to applications that use glib
  121. Group: Development/Libraries
  122. Requires: compat32-%{name}-libudev = %{version}-%{release}
  123. Obsoletes: compat32-libgudev1 < 213
  124. Provides: compat32-libgudev1 = 213
  125. %description -n compat32-%{name}-libgudev1
  126. This package contains the libraries that make it easier to use libudev
  127. %package -n compat32-%{name}-libgudev1-devel
  128. Summary: Header files for adding libudev support to applications that use glib
  129. Group: Development/Libraries
  130. Requires: compat32-%{name}-libudev-devel
  131. Requires: compat32-%{name}-libgudev1 = %{version}-%{release}
  132. Obsoletes: compat32-libgudev1-devel < 213
  133. Provides: compat32-libgudev1-devel = 213
  134. %description -n compat32-%{name}-libgudev1-devel
  135. This package contains the header and pkg-config files for developing
  136. glib-based applications using libudev functionality.
  137. %prep
  138. %setup -q
  139. %patch1001 -p1 -b .vine
  140. %build
  141. NOCONFIGURE=1 ./autogen.sh
  142. %configure \
  143. --disable-selinux \
  144. --prefix=%{_prefix} \
  145. --with-rootprefix= \
  146. --sysconfdir=%{_sysconfdir} \
  147. --exec-prefix="" \
  148. --bindir="/sbin" \
  149. --sbindir="/sbin" \
  150. --libexecdir=/lib \
  151. --with-rootlibdir=/%{_lib} \
  152. --with-rootlibexecdir=/lib/udev \
  153. --enable-introspection \
  154. --enable-rule_generator \
  155. --enable-static
  156. make %{?_smp_mflags}
  157. %install
  158. rm -rf $RPM_BUILD_ROOT
  159. mkdir -p $RPM_BUILD_ROOT%{_sbindir}
  160. make DESTDIR=$RPM_BUILD_ROOT install
  161. rm -fr $RPM_BUILD_ROOT%{_docdir}/udev
  162. rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
  163. rm -f $RPM_BUILD_ROOT/%{_libdir}/libgudev*.a
  164. rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules
  165. rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev
  166. rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug
  167. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices}
  168. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d
  169. mkdir -p $RPM_BUILD_ROOT%{_bindir}
  170. touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config
  171. # force relative symlinks
  172. ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id
  173. ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo
  174. ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest
  175. ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor
  176. ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevtrigger
  177. ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevsettle
  178. ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevcontrol
  179. mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
  180. for i in \
  181. %ifarch ppc ppc64
  182. rules/arch/40-ppc.rules \
  183. %endif
  184. ; do
  185. install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}"
  186. done
  187. mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
  188. install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh
  189. mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev
  190. install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev
  191. mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir}
  192. mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
  193. cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf <<EOF
  194. alias pnp:dPNP0700 floppy
  195. alias acpi:PNP0700: floppy
  196. EOF
  197. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
  198. install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post
  199. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
  200. install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev
  201. mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d
  202. %pre
  203. getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || :
  204. getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || :
  205. getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || :
  206. getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || :
  207. getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || :
  208. %preun
  209. if [ $1 = 0 -a -f %{_initrddir}/udev ]; then
  210. if [ -x /sbin/pidof ]; then
  211. pid=$(/sbin/pidof udevd)
  212. if [ -n "$pid" ]; then
  213. kill $pid
  214. fi
  215. fi
  216. /sbin/chkconfig --del udev
  217. fi
  218. if [ "$1" = 0 ]; then
  219. /sbin/chkconfig --del udev-post
  220. fi
  221. exit 0
  222. %post
  223. if [ "$1" -ge "1" -a -x /sbin/pidof ]; then
  224. pid=$(/sbin/pidof udevd)
  225. if [ -n "$pid" ]; then
  226. kill $pid
  227. /sbin/udevd -d
  228. fi
  229. fi
  230. /sbin/ldconfig
  231. exit 0
  232. %postun -p /sbin/ldconfig
  233. %posttrans
  234. udevadm hwdb --update > /dev/null 2>&1 || :
  235. /sbin/chkconfig --add udev-post
  236. %triggerpostun -- dev <= 0:3.21-1vl1
  237. if [ $2 = 0 ]; then
  238. if [ -x /sbin/MAKEDEV ]; then
  239. /sbin/MAKEDEV null
  240. /sbin/MAKEDEV console
  241. else
  242. /bin/mknod /dev/null c 1 3
  243. /bin/mknod /dev/console c 5 1
  244. fi
  245. if [ "$(/sbin/kernelversion)" == "2.6" ] &&
  246. [ $(($(uname -r |cut -f1 -d-|cut -f3 -d.))) -gt 15 ]
  247. then
  248. /sbin/start_udev >/dev/null 2>&1
  249. if [ -e /dev/mapper/control -a -x /sbin/lvm ]; then
  250. /sbin/lvm vgmknodes >/dev/null 2>&1
  251. fi
  252. fi
  253. fi
  254. exit 0
  255. %clean
  256. rm -rf $RPM_BUILD_ROOT
  257. %files
  258. %defattr(-,root,root)
  259. %doc COPYING README
  260. %attr(0755,root,root) /sbin/udevadm
  261. %attr(0755,root,root) /sbin/udevd
  262. %attr(0755,root,root) /sbin/start_udev
  263. /sbin/udevcontrol
  264. /sbin/udevtrigger
  265. /sbin/udevsettle
  266. /sbin/scsi_id
  267. %attr(0755,root,root) %{udev_scriptdir}/ata_id
  268. %attr(0755,root,root) %{udev_scriptdir}/cdrom_id
  269. %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh
  270. %attr(0755,root,root) %{udev_scriptdir}/collect
  271. %attr(0755,root,root) %{udev_scriptdir}/mtd_probe
  272. %attr(0755,root,root) %{udev_scriptdir}/accelerometer
  273. %attr(0644,root,root) %{udev_scriptdir}/rule_generator.functions
  274. %attr(0755,root,root) %{udev_scriptdir}/write_cd_rules
  275. %attr(0755,root,root) %{udev_scriptdir}/write_net_rules
  276. %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post
  277. %{_bindir}/udevtest
  278. %{_bindir}/udevinfo
  279. %{_sbindir}/udevmonitor
  280. %attr(0755,root,root) %dir %{_sysconfdir}/udev/
  281. %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/
  282. %attr(0755,root,root) %dir %{udev_scriptdir}/
  283. %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/
  284. %attr(0755,root,root) %dir %{udev_scriptdir}/devices/
  285. %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/
  286. %dir %{_sysconfdir}/udev/hwdb.d
  287. %{_sysconfdir}/udev/hwdb.d/20-OUI.hwdb
  288. %{_sysconfdir}/udev/hwdb.d/20-acpi-vendor.hwdb
  289. %{_sysconfdir}/udev/hwdb.d/20-bluetooth-vendor-product.hwdb
  290. %{_sysconfdir}/udev/hwdb.d/20-pci-classes.hwdb
  291. %{_sysconfdir}/udev/hwdb.d/20-pci-vendor-model.hwdb
  292. %{_sysconfdir}/udev/hwdb.d/20-sdio-classes.hwdb
  293. %{_sysconfdir}/udev/hwdb.d/20-sdio-vendor-model.hwdb
  294. %{_sysconfdir}/udev/hwdb.d/20-usb-classes.hwdb
  295. %{_sysconfdir}/udev/hwdb.d/20-usb-vendor-model.hwdb
  296. %{_sysconfdir}/udev/hwdb.d/60-keyboard.hwdb
  297. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev
  298. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf
  299. %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules
  300. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config
  301. %config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf
  302. %dir %attr(0755,root,root) %{firmwaredir}
  303. %{_mandir}/man8/udev*.8*
  304. %{_mandir}/man7/udev*.7*
  305. %{_mandir}/man5/udev*.5*
  306. %dir %attr(0755,root,root) /var/lib/udev
  307. %dir %attr(0755,root,root) /var/lib/udev/makedev.d
  308. # Deprecated, but keep the ownership
  309. %ghost %dir %{_sysconfdir}/udev/scripts/
  310. %ghost %dir %{_sysconfdir}/udev/devices/
  311. %ghost %dir %{_sysconfdir}/dev.d/
  312. %attr(0755,root,root) %{udev_scriptdir}/scsi_id
  313. %attr(0755,root,root) %{udev_scriptdir}/v4l_id
  314. %files libudev
  315. %defattr(0644,root,root,0755)
  316. /%{_lib}/libudev.so.*
  317. %files libudev-devel
  318. %defattr(0644,root,root,0755)
  319. %doc COPYING
  320. %{_includedir}/libudev.h
  321. %{_includedir}/udev.h
  322. %{_libdir}/libudev.so
  323. %{_libdir}/pkgconfig/libudev.pc
  324. %{_datadir}/pkgconfig/udev.pc
  325. %files libudev-static
  326. %defattr(0644,root,root,0755)
  327. %{_libdir}/libudev.a
  328. %files libgudev1
  329. %defattr(0644, root, root, 0755)
  330. %doc COPYING
  331. /%{_lib}/libgudev-1.0.so.*
  332. %{_libdir}/girepository-1.0/GUdev-1.0.typelib
  333. %files libgudev1-devel
  334. %defattr(0644, root, root, 0755)
  335. %doc COPYING
  336. %{_libdir}/libgudev-1.0.so
  337. %{_includedir}/gudev-1.0/gudev/*.h
  338. %{_datadir}/gir-1.0/GUdev-1.0.gir
  339. %{_libdir}/pkgconfig/gudev-1.0*
  340. %if %{build_compat32}
  341. %files -n compat32-%{name}-libudev
  342. %defattr(0644,root,root,0755)
  343. /%{_lib}/libudev.so.*
  344. %files -n compat32-%{name}-libudev-devel
  345. %defattr(0644,root,root,0755)
  346. %{_libdir}/libudev.so
  347. %files -n compat32-%{name}-libgudev1
  348. %defattr(0644, root, root, 0755)
  349. /%{_lib}/libgudev-1.0.so.*
  350. %files -n compat32-%{name}-libgudev1-devel
  351. %defattr(0644, root, root, 0755)
  352. %doc COPYING
  353. %{_libdir}/libgudev-1.0.so
  354. %endif
  355. %changelog
  356. * Sun Aug 31 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10-1
  357. - new upstream release
  358. * Fri Jun 27 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8-1
  359. - new upstream release
  360. * Wed Jun 25 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7-1
  361. - initial build for Vine Linux based on udev package