xfce4-mixer.spec add package alsa, oss

Kamil Jakubowski newsonet at poczta.onet.pl
Thu Dec 1 12:01:50 CET 2005


alsa-mixer domyslnie buduje sie dla oss
wiec proponuje podzial na paczki

alsa-mixer-alsa --with-sound=alsa
alsa-mixer-oss --with-sound=oss

nie wiem tylko co ze sparc
jest mozliwosc zbudowania dla
--with-sound=sun
-------------- next part --------------
--- xfce4-mixer.spec	2005-12-01 11:38:55.000000000 +0100
+++ xfce4-mixer.spec.new	2005-12-01 11:40:28.198595000 +0100
@@ -1,16 +1,17 @@
 # $Revision: 1.31 $, $Date: 2005/11/10 06:01:13 $
+#%bcond_without	alsa	#
+#%bcond_without	oss	#
 Summary:	Volume control plugin for the Xfce panel
 Summary(pl):	Wtyczka sterująca głośnością dla panelu Xfce
 Name:		xfce4-mixer
 Version:	4.2.3
-Release:	1
+Release:	2
 License:	BSD
 Group:		X11/Applications/Sound
-Source0:        http://hannelore.f1.fhtw-berlin.de/mirrors/xfce4/xfce-%{version}/src/%{name}-%{version}.tar.gz
+Source0:	http://hannelore.f1.fhtw-berlin.de/mirrors/xfce4/xfce-%{version}/src/%{name}-%{version}.tar.gz
 # Source0-md5:	b57fd602b3612fb84a92b124f3468511
 Patch0:		%{name}-locale-names.patch
 URL:		http://www.xfce.org/
-BuildRequires:	alsa-lib-devel >= 0.9.0
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
 BuildRequires:	gettext-devel
@@ -20,18 +21,50 @@
 BuildRequires:	xfce-mcs-manager-devel >= %{version}
 BuildRequires:	xfce4-dev-tools
 BuildRequires:	xfce4-panel-devel >= %{version}
-Requires:	alsa-lib >= 0.9.0
-Requires:	xfce4-panel >= %{version}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-xfce4-mixer is the volume control plugin for the Xfce panel.
-Includes a simple sound mixer.
+xfce4-mixer is the volume control plugin for the Xfce panel. Includes
+a simple sound mixer.
 
 %description -l pl
 xfce4-mixer to wtyczka sterująca głośnością dla panelu Xfce. Zawiera
 prosty mikser dźwięku.
 
+%package alsa
+Summary:	Volume control plugin for the Xfce panel
+Summary(pl):	Wtyczka sterująca głośnością dla panelu Xfce
+Group:		X11/Applications/Sound
+BuildRequires:	alsa-lib-devel >= 0.9.0
+Requires(post):	/sbin/ldconfig
+Requires:	alsa-lib >= 0.9.0
+Requires:	xfce4-panel >= %{version}
+Obsoletes:	%{name}-oss
+
+%description alsa
+xfce4-mixer is the volume control plugin for the Xfce panel. Includes
+a simple sound mixer.
+
+%description alsa -l pl
+xfce4-mixer to wtyczka sterująca głośnością dla panelu Xfce. Zawiera
+prosty mikser dźwięku.
+
+%package oss
+Summary:	Volume control plugin for the Xfce panel
+Summary(pl):	Wtyczka sterująca głośnością dla panelu Xfce
+Group:		X11/Applications/Sound
+Requires(post):	/sbin/ldconfig
+Requires:	xfce4-panel >= %{version}
+Obsoletes:	%{name}-alsa
+
+%description oss
+xfce4-mixer is the volume control plugin for the Xfce panel. Includes
+a simple sound mixer.
+
+%description oss -l pl
+xfce4-mixer to wtyczka sterująca głośnością dla panelu Xfce. Zawiera
+prosty mikser dźwięku.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -45,10 +78,15 @@
 %{__autoheader}
 %{__automake}
 %{__autoconf}
+for sound in alsa oss; do
 %configure \
-	--disable-static
+	--disable-static \
+	--with-sound=$sound
 
 %{__make}
+cp -f lib/.libs/libxfce4mixer.so.0.0.0 libxfce4mixer-$sound.so.0.0.0
+%{__make} clean
+done
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -56,6 +94,9 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+install libxfce4mixer-*.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/xfce4/modules/
+> $RPM_BUILD_ROOT%{_libdir}/xfce4/modules/libxfce4mixer.so.0.0.0
+
 rm -f $RPM_BUILD_ROOT%{_libdir}/xfce4/*/*.la
 
 %find_lang %{name}
@@ -63,13 +104,42 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files -f %{name}.lang
+%post   -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%post alsa
+ln -fs libxfce4mixer-alsa.so.0.0.0 %{_libdir}/xfce4/modules/libxfce4mixer.so.0.0.0
+/sbin/ldconfig
+
+%postun alsa -p /sbin/ldconfig
+
+%post oss
+ln -fs libxfce4mixer-oss.so.0.0.0 %{_libdir}/xfce4/modules/libxfce4mixer.so.0.0.0
+/sbin/ldconfig
+
+%postun oss -p /sbin/ldconfig
+
+%files alsa -f %{name}.lang
+%defattr(644,root,root,755)
+%doc AUTHORS COPYING README TODO
+%attr(755,root,root) %{_bindir}/xfce4-mixer
+%attr(755,root,root) %{_libdir}/xfce4/mcs-plugins/*.so
+# why no -avoid-version?
+%attr(755,root,root) %{_libdir}/xfce4/modules/libxfce4mixer.so*
+%attr(755,root,root) %{_libdir}/xfce4/modules/libxfce4mixer-alsa.so.0.0.0
+%attr(755,root,root) %{_libdir}/xfce4/panel-plugins/*.so
+%{_iconsdir}/hicolor/*/*/*
+
+%{_desktopdir}/xfce-mixer-settings.desktop
+
+%files oss -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING README TODO
 %attr(755,root,root) %{_bindir}/xfce4-mixer
 %attr(755,root,root) %{_libdir}/xfce4/mcs-plugins/*.so
 # why no -avoid-version?
-%attr(755,root,root) %{_libdir}/xfce4/modules/lib*.so*
+%attr(755,root,root) %{_libdir}/xfce4/modules/libxfce4mixer.so*
+%attr(755,root,root) %{_libdir}/xfce4/modules/libxfce4mixer-oss.so.0.0.0
 %attr(755,root,root) %{_libdir}/xfce4/panel-plugins/*.so
 %{_iconsdir}/hicolor/*/*/*
 
-------------- next part --------------
# $Revision: 1.31 $, $Date: 2005/11/10 06:01:13 $
#%bcond_without	alsa	#
#%bcond_without	oss	#
Summary:	Volume control plugin for the Xfce panel
Summary(pl):	Wtyczka sterująca głośnością dla panelu Xfce
Name:		xfce4-mixer
Version:	4.2.3
Release:	2
License:	BSD
Group:		X11/Applications/Sound
Source0:	http://hannelore.f1.fhtw-berlin.de/mirrors/xfce4/xfce-%{version}/src/%{name}-%{version}.tar.gz
# Source0-md5:	b57fd602b3612fb84a92b124f3468511
Patch0:		%{name}-locale-names.patch
URL:		http://www.xfce.org/
BuildRequires:	autoconf >= 2.50
BuildRequires:	automake
BuildRequires:	gettext-devel
BuildRequires:	libtool
BuildRequires:	libxfce4mcs-devel >= %{version}
BuildRequires:	pkgconfig >= 1:0.9.0
BuildRequires:	xfce-mcs-manager-devel >= %{version}
BuildRequires:	xfce4-dev-tools
BuildRequires:	xfce4-panel-devel >= %{version}
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
xfce4-mixer is the volume control plugin for the Xfce panel. Includes
a simple sound mixer.

%description -l pl
xfce4-mixer to wtyczka sterująca głośnością dla panelu Xfce. Zawiera
prosty mikser dźwięku.

%package alsa
Summary:	Volume control plugin for the Xfce panel
Summary(pl):	Wtyczka sterująca głośnością dla panelu Xfce
Group:		X11/Applications/Sound
BuildRequires:	alsa-lib-devel >= 0.9.0
Requires(post):	/sbin/ldconfig
Requires:	alsa-lib >= 0.9.0
Requires:	xfce4-panel >= %{version}
Obsoletes:	%{name}-oss

%description alsa
xfce4-mixer is the volume control plugin for the Xfce panel. Includes
a simple sound mixer.

%description alsa -l pl
xfce4-mixer to wtyczka sterująca głośnością dla panelu Xfce. Zawiera
prosty mikser dźwięku.

%package oss
Summary:	Volume control plugin for the Xfce panel
Summary(pl):	Wtyczka sterująca głośnością dla panelu Xfce
Group:		X11/Applications/Sound
Requires(post):	/sbin/ldconfig
Requires:	xfce4-panel >= %{version}
Obsoletes:	%{name}-alsa

%description oss
xfce4-mixer is the volume control plugin for the Xfce panel. Includes
a simple sound mixer.

%description oss -l pl
xfce4-mixer to wtyczka sterująca głośnością dla panelu Xfce. Zawiera
prosty mikser dźwięku.

%prep
%setup -q
%patch0 -p1

mv -f po/{nb_NO,nb}.po
mv -f po/{pt_PT,pt}.po

%build
%{__libtoolize}
%{__aclocal} -I %{_datadir}/xfce4/dev-tools/m4macros
%{__autoheader}
%{__automake}
%{__autoconf}
for sound in alsa oss; do
%configure \
	--disable-static \
	--with-sound=$sound

%{__make}
cp -f lib/.libs/libxfce4mixer.so.0.0.0 libxfce4mixer-$sound.so.0.0.0
%{__make} clean
done

%install
rm -rf $RPM_BUILD_ROOT

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install libxfce4mixer-*.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/xfce4/modules/
> $RPM_BUILD_ROOT%{_libdir}/xfce4/modules/libxfce4mixer.so.0.0.0

rm -f $RPM_BUILD_ROOT%{_libdir}/xfce4/*/*.la

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%post alsa
ln -fs libxfce4mixer-alsa.so.0.0.0 %{_libdir}/xfce4/modules/libxfce4mixer.so.0.0.0
/sbin/ldconfig

%postun alsa -p /sbin/ldconfig

%post oss
ln -fs libxfce4mixer-oss.so.0.0.0 %{_libdir}/xfce4/modules/libxfce4mixer.so.0.0.0
/sbin/ldconfig

%postun oss -p /sbin/ldconfig

%files alsa -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS COPYING README TODO
%attr(755,root,root) %{_bindir}/xfce4-mixer
%attr(755,root,root) %{_libdir}/xfce4/mcs-plugins/*.so
# why no -avoid-version?
%attr(755,root,root) %{_libdir}/xfce4/modules/libxfce4mixer.so*
%attr(755,root,root) %{_libdir}/xfce4/modules/libxfce4mixer-alsa.so.0.0.0
%attr(755,root,root) %{_libdir}/xfce4/panel-plugins/*.so
%{_iconsdir}/hicolor/*/*/*

%{_desktopdir}/xfce-mixer-settings.desktop

%files oss -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS COPYING README TODO
%attr(755,root,root) %{_bindir}/xfce4-mixer
%attr(755,root,root) %{_libdir}/xfce4/mcs-plugins/*.so
# why no -avoid-version?
%attr(755,root,root) %{_libdir}/xfce4/modules/libxfce4mixer.so*
%attr(755,root,root) %{_libdir}/xfce4/modules/libxfce4mixer-oss.so.0.0.0
%attr(755,root,root) %{_libdir}/xfce4/panel-plugins/*.so
%{_iconsdir}/hicolor/*/*/*

%{_desktopdir}/xfce-mixer-settings.desktop

%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org

$Log: xfce4-mixer.spec,v $


More information about the pld-devel-pl mailing list