123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453 |
- %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
- %define debug false
- %define udev_scriptdir /lib/udev
- %define firmwaredir /lib/firmware
- Summary: A userspace implementation of devfs
- Summary(ja): ユーザスペース実装のデバイスファイルシステム
- Name: eudev
- Version: 1.10
- Release: 1%{?_dist_release}
- License: GPL
- Group: System Environment/Base
- URL: https://github.com/gentoo/eudev
- Source: http://dev.gentoo.org/~blueness/%{name}/%{name}-%{version}.tar.gz
- Source1: start_udev
- Source3: udev-post.init
- Source4: fw_unit_symlinks.sh
- Source5: udev.sysconfig
- # vine patch
- Patch1001: eudev-1.7-gudev-vine.patch
- ExclusiveOS: Linux
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
- BuildRequires: sed, flex
- BuildRequires: pam-devel, glib2-devel, bison
- BuildRequires: findutils
- BuildRequires: hwdata
- BuildRequires: gobject-introspection-devel >= 0.6.2
- BuildRequires: gtk-doc
- BuildRequires: usbutils >= 0.82
- BuildRequires: gperf
- BuildRequires: libacl-devel
- BuildRequires: libusb-devel
- BuildRequires: kmod-devel
- BuildRequires: libblkid-devel
- Requires(pre): /bin/sh fileutils
- Requires(pre): MAKEDEV >= 3.21
- Requires: %{name}-libudev = %{version}-%{release}
- Requires: MAKEDEV >= 3.21
- Requires: util-linux-ng >= 2.16
- Obsoletes: udev < 213
- Provides: udev = 213
- Obsoletes: dev < 3.22
- Conflicts: dev < 3.22
- Provides: dev = 3.22
- Obsoletes: murasaki, usbmgr, hotplug, hal, hal-info
- Requires: pam
- Vendor: Project Vine
- Distribution: Vine Linux
- Packager: daisuke, Takemikaduchi
- %description
- The udev package contains an implementation of devfs in
- userspace using sysfs and netlink.
- %package libudev
- Summary: Dynamic library to access udev device information
- Group: System Environment/Libraries
- %description libudev
- This package contains the dynamic library libudev, which provides access
- to udev device information, and an interface to search devices in sysfs.
- %package libudev-devel
- Summary: Development files for libudev
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- Requires: %{name}-libudev = %{version}-%{release}
- Obsoletes: libudev-devel < 213
- Provides: libudev-devel = 213
- %description libudev-devel
- This package contains the development files for the library libudev, a
- dynamic library, which provides access to udev device information.
- %package libudev-static
- Summary: Static libraries for libudev
- Group: Development/Libraries
- Requires: %{name}-libudev-devel = %{version}-%{release}
- Obsoletes: libudev-static < 213
- Provides: libudev-static = 213
- %description libudev-static
- This package contains the static library libudev, which provides
- access to udev device information.
- %package libgudev1
- Summary: Libraries for adding libudev support to applications that use glib
- Group: Development/Libraries
- Requires: %{name}-libudev = %{version}-%{release}
- # remove the following lines for libgudev so major 1
- Obsoletes: libgudev <= 20090517
- Provides: libgudev = 20090518
- Obsoletes: libgudev1 < 213
- Provides: libgudev1 = 213
- %description libgudev1
- This package contains the libraries that make it easier to use libudev
- functionality from applications that use glib.
- %package libgudev1-devel
- Summary: Header files for adding libudev support to applications that use glib
- Group: Development/Libraries
- Requires: %{name}-libgudev1 = %{version}-%{release}
- Requires: %{name}-libudev-devel = %{version}-%{release}
- Obsoletes: libgudev-devel <= 20090517
- Provides: libgudev-devel = 20090518
- Obsoletes: libgudev1-devel < 213
- Provides: libgudev1-devel = 213
- %description libgudev1-devel
- This package contains the header and pkg-config files for developing
- glib-based applications using libudev functionality.
- # compat32
- %package -n compat32-%{name}-libudev
- Summary: A userspace implementation of devfs
- Summary(ja): ユーザスペース実装のデバイスファイルシステム
- Group: System Environment/Base
- Requires: %{name}-libudev = %{version}-%{release}
- %description -n compat32-%{name}-libudev
- The udev package contains an implementation of devfs in
- userspace using sysfs and netlink.
- %package -n compat32-%{name}-libudev-devel
- Summary: Development files for libudev
- Group: Development/Libraries
- Requires: compat32-%{name}-libudev = %{version}-%{release}
- Obsoletes: compat32-libudev-devel < 213
- Provides: compat32-libudev-devel = 213
- %description -n compat32-%{name}-libudev-devel
- This package contains the development files for the library libudev, a
- dynamic library, which provides access to udev device information.
- %package -n compat32-%{name}-libgudev1
- Summary: Libraries for adding libudev support to applications that use glib
- Group: Development/Libraries
- Requires: compat32-%{name}-libudev = %{version}-%{release}
- Obsoletes: compat32-libgudev1 < 213
- Provides: compat32-libgudev1 = 213
- %description -n compat32-%{name}-libgudev1
- This package contains the libraries that make it easier to use libudev
- %package -n compat32-%{name}-libgudev1-devel
- Summary: Header files for adding libudev support to applications that use glib
- Group: Development/Libraries
- Requires: compat32-%{name}-libudev-devel
- Requires: compat32-%{name}-libgudev1 = %{version}-%{release}
- Obsoletes: compat32-libgudev1-devel < 213
- Provides: compat32-libgudev1-devel = 213
- %description -n compat32-%{name}-libgudev1-devel
- This package contains the header and pkg-config files for developing
- glib-based applications using libudev functionality.
- %prep
- %setup -q
- %patch1001 -p1 -b .vine
- %build
- NOCONFIGURE=1 ./autogen.sh
- %configure \
- --disable-selinux \
- --prefix=%{_prefix} \
- --with-rootprefix= \
- --sysconfdir=%{_sysconfdir} \
- --exec-prefix="" \
- --bindir="/sbin" \
- --sbindir="/sbin" \
- --libexecdir=/lib \
- --with-rootlibdir=/%{_lib} \
- --with-rootlibexecdir=/lib/udev \
- --enable-introspection \
- --enable-rule_generator \
- --enable-static
- make %{?_smp_mflags}
- %install
- rm -rf $RPM_BUILD_ROOT
- mkdir -p $RPM_BUILD_ROOT%{_sbindir}
- make DESTDIR=$RPM_BUILD_ROOT install
- rm -fr $RPM_BUILD_ROOT%{_docdir}/udev
- rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
- rm -f $RPM_BUILD_ROOT/%{_libdir}/libgudev*.a
- rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules
- rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/udev
- rm -f $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug
- mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,makedev.d,scripts,devices}
- mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dev.d
- mkdir -p $RPM_BUILD_ROOT%{_bindir}
- touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config
- # force relative symlinks
- ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id
- ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo
- ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest
- ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor
- ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevtrigger
- ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevsettle
- ln -sf udevadm $RPM_BUILD_ROOT/sbin/udevcontrol
- mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
- for i in \
- %ifarch ppc ppc64
- rules/arch/40-ppc.rules \
- %endif
- ; do
- install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}"
- done
- mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
- install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh
- mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev
- install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev
- mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir}
- mkdir -p -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
- cat > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/floppy-pnp.conf <<EOF
- alias pnp:dPNP0700 floppy
- alias acpi:PNP0700: floppy
- EOF
- mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
- install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/udev-post
- mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
- install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/udev
- mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d
- %pre
- getent group video >/dev/null || /usr/sbin/groupadd -g 39 video || :
- getent group audio >/dev/null || /usr/sbin/groupadd -g 63 audio || :
- getent group cdrom >/dev/null || /usr/sbin/groupadd -g 11 cdrom || :
- getent group tape >/dev/null || /usr/sbin/groupadd -g 33 tape || :
- getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || :
- %preun
- if [ $1 = 0 -a -f %{_initrddir}/udev ]; then
- if [ -x /sbin/pidof ]; then
- pid=$(/sbin/pidof udevd)
- if [ -n "$pid" ]; then
- kill $pid
- fi
- fi
- /sbin/chkconfig --del udev
- fi
- if [ "$1" = 0 ]; then
- /sbin/chkconfig --del udev-post
- fi
- exit 0
- %post
- if [ "$1" -ge "1" -a -x /sbin/pidof ]; then
- pid=$(/sbin/pidof udevd)
- if [ -n "$pid" ]; then
- kill $pid
- /sbin/udevd -d
- fi
- fi
- /sbin/ldconfig
- exit 0
- %postun -p /sbin/ldconfig
- %posttrans
- udevadm hwdb --update > /dev/null 2>&1 || :
- /sbin/chkconfig --add udev-post
- %triggerpostun -- dev <= 0:3.21-1vl1
- if [ $2 = 0 ]; then
- if [ -x /sbin/MAKEDEV ]; then
- /sbin/MAKEDEV null
- /sbin/MAKEDEV console
- else
- /bin/mknod /dev/null c 1 3
- /bin/mknod /dev/console c 5 1
- fi
- if [ "$(/sbin/kernelversion)" == "2.6" ] &&
- [ $(($(uname -r |cut -f1 -d-|cut -f3 -d.))) -gt 15 ]
- then
- /sbin/start_udev >/dev/null 2>&1
- if [ -e /dev/mapper/control -a -x /sbin/lvm ]; then
- /sbin/lvm vgmknodes >/dev/null 2>&1
- fi
- fi
- fi
- exit 0
- %clean
- rm -rf $RPM_BUILD_ROOT
- %files
- %defattr(-,root,root)
- %doc COPYING README
- %attr(0755,root,root) /sbin/udevadm
- %attr(0755,root,root) /sbin/udevd
- %attr(0755,root,root) /sbin/start_udev
- /sbin/udevcontrol
- /sbin/udevtrigger
- /sbin/udevsettle
- /sbin/scsi_id
- %attr(0755,root,root) %{udev_scriptdir}/ata_id
- %attr(0755,root,root) %{udev_scriptdir}/cdrom_id
- %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh
- %attr(0755,root,root) %{udev_scriptdir}/collect
- %attr(0755,root,root) %{udev_scriptdir}/mtd_probe
- %attr(0755,root,root) %{udev_scriptdir}/accelerometer
- %attr(0644,root,root) %{udev_scriptdir}/rule_generator.functions
- %attr(0755,root,root) %{udev_scriptdir}/write_cd_rules
- %attr(0755,root,root) %{udev_scriptdir}/write_net_rules
- %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post
- %{_bindir}/udevtest
- %{_bindir}/udevinfo
- %{_sbindir}/udevmonitor
- %attr(0755,root,root) %dir %{_sysconfdir}/udev/
- %attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/
- %attr(0755,root,root) %dir %{udev_scriptdir}/
- %attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/
- %attr(0755,root,root) %dir %{udev_scriptdir}/devices/
- %attr(0755,root,root) %dir %{_sysconfdir}/udev/makedev.d/
- %dir %{_sysconfdir}/udev/hwdb.d
- %{_sysconfdir}/udev/hwdb.d/20-OUI.hwdb
- %{_sysconfdir}/udev/hwdb.d/20-acpi-vendor.hwdb
- %{_sysconfdir}/udev/hwdb.d/20-bluetooth-vendor-product.hwdb
- %{_sysconfdir}/udev/hwdb.d/20-pci-classes.hwdb
- %{_sysconfdir}/udev/hwdb.d/20-pci-vendor-model.hwdb
- %{_sysconfdir}/udev/hwdb.d/20-sdio-classes.hwdb
- %{_sysconfdir}/udev/hwdb.d/20-sdio-vendor-model.hwdb
- %{_sysconfdir}/udev/hwdb.d/20-usb-classes.hwdb
- %{_sysconfdir}/udev/hwdb.d/20-usb-vendor-model.hwdb
- %{_sysconfdir}/udev/hwdb.d/60-keyboard.hwdb
- %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/udev
- %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/udev/udev.conf
- %attr(0644,root,root) %{udev_scriptdir}/rules.d/*.rules
- %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/scsi_id.config
- %config %attr(0644,root,root) %{_sysconfdir}/modprobe.d/floppy-pnp.conf
- %dir %attr(0755,root,root) %{firmwaredir}
- %{_mandir}/man8/udev*.8*
- %{_mandir}/man7/udev*.7*
- %{_mandir}/man5/udev*.5*
- %dir %attr(0755,root,root) /var/lib/udev
- %dir %attr(0755,root,root) /var/lib/udev/makedev.d
- # Deprecated, but keep the ownership
- %ghost %dir %{_sysconfdir}/udev/scripts/
- %ghost %dir %{_sysconfdir}/udev/devices/
- %ghost %dir %{_sysconfdir}/dev.d/
- %attr(0755,root,root) %{udev_scriptdir}/scsi_id
- %attr(0755,root,root) %{udev_scriptdir}/v4l_id
- %files libudev
- %defattr(0644,root,root,0755)
- /%{_lib}/libudev.so.*
- %files libudev-devel
- %defattr(0644,root,root,0755)
- %doc COPYING
- %{_includedir}/libudev.h
- %{_includedir}/udev.h
- %{_libdir}/libudev.so
- %{_libdir}/pkgconfig/libudev.pc
- %{_datadir}/pkgconfig/udev.pc
- %files libudev-static
- %defattr(0644,root,root,0755)
- %{_libdir}/libudev.a
- %files libgudev1
- %defattr(0644, root, root, 0755)
- %doc COPYING
- /%{_lib}/libgudev-1.0.so.*
- %{_libdir}/girepository-1.0/GUdev-1.0.typelib
- %files libgudev1-devel
- %defattr(0644, root, root, 0755)
- %doc COPYING
- %{_libdir}/libgudev-1.0.so
- %{_includedir}/gudev-1.0/gudev/*.h
- %{_datadir}/gir-1.0/GUdev-1.0.gir
- %{_libdir}/pkgconfig/gudev-1.0*
- %if %{build_compat32}
- %files -n compat32-%{name}-libudev
- %defattr(0644,root,root,0755)
- /%{_lib}/libudev.so.*
- %files -n compat32-%{name}-libudev-devel
- %defattr(0644,root,root,0755)
- %{_libdir}/libudev.so
- %files -n compat32-%{name}-libgudev1
- %defattr(0644, root, root, 0755)
- /%{_lib}/libgudev-1.0.so.*
- %files -n compat32-%{name}-libgudev1-devel
- %defattr(0644, root, root, 0755)
- %doc COPYING
- %{_libdir}/libgudev-1.0.so
- %endif
- %changelog
- * Sun Aug 31 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10-1
- - new upstream release
- * Fri Jun 27 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8-1
- - new upstream release
- * Wed Jun 25 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7-1
- - initial build for Vine Linux based on udev package
|