install everything in /usr
This patch is needed for the /usr-move feature https://fedoraproject.org/wiki/Features/UsrMove This package requires now 'filesystem' >= 3, which is only installable on a system which has /bin, /sbin, /lib, /lib64 as symlinks to /usr and not regular directories. The 'filesystem' package acts as a guard, to prevent *this* package to be installed on old unconverted systems. New installations will have the 'filesystem' >=3 layout right away, old installations need to be converted with anaconda or dracut first; only after that, the 'filesystem' package, and also *this* package can be installed. Packages *should* not install files in /bin, /sbin, /lib, /lib64, but only in the corresponding directories in /usr. Packages *must* not install conflicting files with the same names in the corresponding directories in / and /usr. Especially compatibilty symlinks must not be installed. Feel free to modify any of the changes to the spec file, but keep the above in mind.
This commit is contained in:
parent
19dca999a8
commit
de1af9d6bf
@ -4,7 +4,7 @@
|
||||
Summary: Advanced Linux Sound Architecture (ALSA) utilities
|
||||
Name: alsa-utils
|
||||
Version: %{baseversion}%{?fixversion}
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/Multimedia
|
||||
URL: http://www.alsa-project.org/
|
||||
@ -22,8 +22,10 @@ BuildRequires: libsamplerate-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: xmlto
|
||||
Conflicts: udev < 062
|
||||
Requires: alsa-lib >= %{baseversion}, systemd-units, dialog
|
||||
BuildRequires: systemd-units >= 39-2
|
||||
Conflicts: udev <= 179-2
|
||||
Requires: alsa-lib >= %{baseversion}, systemd-units >= 39-2, dialog
|
||||
Conflicts: filesystem < 3
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=738227
|
||||
Patch0: 0001-Unmute-MacBookAir4-1-speakers.patch
|
||||
@ -37,7 +39,9 @@ Architecture (ALSA).
|
||||
%patch0 -p1 -b .mba41
|
||||
|
||||
%build
|
||||
%configure CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" --sbindir=/sbin --disable-alsaconf --with-systemdsystemunitdir=/lib/systemd/system
|
||||
%configure CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" --disable-alsaconf \
|
||||
--with-udev-rules-dir=%{_prefix}/lib/udev/rules.d \
|
||||
--with-systemdsystemunitdir=%{_unitdir}
|
||||
%{__make} %{?_smp_mflags}
|
||||
%{__cp} %{SOURCE4} .
|
||||
|
||||
@ -47,26 +51,24 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
||||
%find_lang %{name}
|
||||
|
||||
# Install ALSA udev rules
|
||||
install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT/lib/udev/rules.d/90-alsa-restore.rules
|
||||
install -p -m 644 %{SOURCE20} $RPM_BUILD_ROOT/lib/systemd/system/alsa-restore.service
|
||||
install -p -m 644 %{SOURCE21} $RPM_BUILD_ROOT/lib/systemd/system/alsa-store.service
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/udev/rules.d
|
||||
install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/rules.d/90-alsa-restore.rules
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
||||
install -p -m 644 %{SOURCE20} $RPM_BUILD_ROOT/%{_unitdir}/alsa-restore.service
|
||||
install -p -m 644 %{SOURCE21} $RPM_BUILD_ROOT/%{_unitdir}/alsa-store.service
|
||||
|
||||
# Install support utilities
|
||||
mkdir -p -m755 $RPM_BUILD_ROOT/bin
|
||||
install -p -m 755 alsaunmute %{buildroot}/bin/
|
||||
mkdir -p -m755 $RPM_BUILD_ROOT/%{_bindir}
|
||||
install -p -m 755 alsaunmute %{buildroot}/%{_bindir}
|
||||
mkdir -p -m755 $RPM_BUILD_ROOT/%{_mandir}/man1
|
||||
install -p -m 644 %{SOURCE5} %{buildroot}/%{_mandir}/man1/alsaunmute.1
|
||||
|
||||
# Link alsactl to /usr/sbin
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
|
||||
ln -s ../../sbin/alsactl $RPM_BUILD_ROOT/%{_sbindir}/alsactl
|
||||
# Move /usr/share/alsa/init to /usr/lib/alsa/init
|
||||
mkdir -p -m 755 %{buildroot}/%{_prefix}/lib/alsa
|
||||
mv %{buildroot}%{_datadir}/alsa/init %{buildroot}/%{_prefix}/lib/alsa
|
||||
|
||||
# Move /usr/share/alsa/init to /lib/alsa/init
|
||||
mkdir -p -m 755 %{buildroot}/lib/alsa
|
||||
mv %{buildroot}%{_datadir}/alsa/init %{buildroot}/lib/alsa
|
||||
|
||||
# Link /lib/alsa/init to /usr/share/alsa/init back
|
||||
ln -s ../../../lib/alsa/init %{buildroot}%{_datadir}/alsa/init
|
||||
# Link /usr/lib/alsa/init to /usr/share/alsa/init back
|
||||
ln -s ../../lib/alsa/init %{buildroot}%{_datadir}/alsa/init
|
||||
|
||||
# Create a place for global configuration
|
||||
mkdir -p -m 755 %{buildroot}/etc/alsa
|
||||
@ -86,21 +88,19 @@ ln -s alsa-info %{buildroot}/usr/bin/alsa-info.sh
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING ChangeLog README TODO
|
||||
%config /etc/alsa/*
|
||||
/bin/*
|
||||
/sbin/*
|
||||
/lib/udev/rules.d/*
|
||||
/lib/systemd/system/*
|
||||
/lib/systemd/system/basic.target.wants/*
|
||||
/lib/systemd/system/shutdown.target.wants/*
|
||||
/lib/alsa/init/*
|
||||
%{_prefix}/lib/udev/rules.d/*
|
||||
%{_unitdir}/*
|
||||
%{_unitdir}/basic.target.wants/*
|
||||
%{_unitdir}/shutdown.target.wants/*
|
||||
%{_prefix}/lib/alsa/init/*
|
||||
%{_bindir}/*
|
||||
%{_sbindir}/*
|
||||
%{_datadir}/alsa/
|
||||
%{_datadir}/sounds/*
|
||||
%{_mandir}/man?/*
|
||||
%dir /etc/alsa/
|
||||
%dir /lib/alsa/
|
||||
%dir /lib/alsa/init/
|
||||
%dir %{_prefix}/lib/alsa/
|
||||
%dir %{_prefix}/lib/alsa/init/
|
||||
%dir /var/lib/alsa/
|
||||
|
||||
%post
|
||||
@ -112,6 +112,10 @@ if [ -s /etc/asound.state -a ! -s /var/lib/alsa/asound.state ] ; then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Wed Jan 25 2012 Harald Hoyer <harald@redhat.com> 1.0.24.1-8
|
||||
- install everything in /usr
|
||||
https://fedoraproject.org/wiki/Features/UsrMove
|
||||
|
||||
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.24.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user