source: projects/specs/trunk/e/eudev/eudev-vl.spec @ 10397

Revision 10397, 12.1 KB checked in by Takemikaduchi, 8 years ago (diff)

new upstream release

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