%define version 3.3.2 %define release 1 Summary: libmikmod sound library Name: libmikmod Version: %{version} Release: %{release} Copyright: LGPL Group: System Environment/Libraries URL: http://mikmod.raphnet.net/ Source0: http://mikmod.raphnet.net/files/%{name}-%{version}.tar.gz PreReq: /sbin/install-info BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description A portable sound library for Unix and other systems, capable of playing samples as well as module files, on a wide range of sound devices. %package devel Summary: Libraries and include files to develop libmikmod applications Group: Development/Libraries Requires: %{name} = %{version} Requires: info %description devel Libraries and include files to develop libmikmod applications. %prep %setup -q %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" export CC="gxlc" # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static make %{?_smp_mflags} cp .libs/%{name}.so.3 . make distclean # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static make %{?_smp_mflags} # add the 64-bit shared objects to the installed shared library containing # already the 32-bit shared objects ${AR} -q .libs/%{name}.a ./%{name}.so.3 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install gzip --best ${RPM_BUILD_ROOT}%{_infodir}/mikmod.info ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %post devel /sbin/install-info %{_infodir}/mikmod.info.gz %{_infodir}/dir || : %preun devel if [ $1 -eq 0 ]; then /sbin/install-info --delete %{_infodir}/mikmod.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS COPYING.LIB COPYING.LESSER INSTALL NEWS README TODO %{_libdir}/lib*.a /usr/lib/lib*.a %files devel %defattr(-,root,system) %{_bindir}/* %{_includedir}/* %{_libdir}/lib*.la %{_infodir}/mikmod* %{_mandir}/man1/* %{_datadir}/aclocal/* /usr/bin/* /usr/include/* /usr/lib/lib*.la %changelog * Tue Oct 08 2013 Michael Perzl - 3.3.2-1 - updated to version 3.3.2 * Sun Jun 03 2012 Michael Perzl - 3.2.0-1 - updated to version 3.2.0 * Sat May 12 2012 Michael Perzl - 3.2.0-beta4-1 - updated to version 3.2.0-beta4 * Tue May 01 2012 Michael Perzl - 3.2.0-beta3-1 - updated to version 3.2.0-beta3 * Thu Oct 01 2009 Michael Perzl - 3.2.0-beta2-2 - fixed an aclocal issue * Wed Jan 23 2008 Michael Perzl - 3.2.0-beta2-1 - first version for AIX V5.1 and higher