From f1ff1cad85b98e20cd8b5cd01ef5bcb272189f98 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 20 Jan 2000 05:44:29 +0000 Subject: [PATCH] Added mixer rpm spec file, by Hakan Tandogan --- Makefile.am | 9 +++++++ Makefile.in | 18 ++++++++++--- SDL_mixer.spec.in | 68 +++++++++++++++++++++++++++++++++++++++++++++++ configure | 2 ++ configure.in | 1 + 5 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 SDL_mixer.spec.in diff --git a/Makefile.am b/Makefile.am index 205dcb87..ed71bf4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,3 +38,12 @@ bin_PROGRAMS = playwave playmus playwave_LDADD = libSDL_mixer.la playmus_LDADD = libSDL_mixer.la + +# Rule to build tar-gzipped distribution package +$(PACKAGE)-$(VERSION).tar.gz: dist + +# Rule to build RPM distribution package +rpm: $(PACKAGE)-$(VERSION).tar.gz + cp $(PACKAGE)-$(VERSION).tar.gz /usr/src/redhat/SOURCES + rpm -ba SDL_mixer.spec + diff --git a/Makefile.in b/Makefile.in index 6ed79a26..8bbf6a64 100644 --- a/Makefile.in +++ b/Makefile.in @@ -113,7 +113,7 @@ playwave_LDADD = libSDL_mixer.la playmus_LDADD = libSDL_mixer.la ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = SDL_mixer.spec LTLIBRARIES = $(lib_LTLIBRARIES) @@ -147,9 +147,9 @@ CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ HEADERS = $(libSDL_mixerinclude_HEADERS) -DIST_COMMON = README COPYING Makefile.am Makefile.in acinclude.m4 \ -aclocal.m4 config.guess config.sub configure configure.in install-sh \ -ltconfig ltmain.sh missing mkinstalldirs +DIST_COMMON = README COPYING Makefile.am Makefile.in SDL_mixer.spec.in \ +acinclude.m4 aclocal.m4 config.guess config.sub configure configure.in \ +install-sh ltconfig ltmain.sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) @@ -178,6 +178,8 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) +SDL_mixer.spec: $(top_builddir)/config.status SDL_mixer.spec.in + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-libLTLIBRARIES: @@ -565,6 +567,14 @@ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean +# Rule to build tar-gzipped distribution package +$(PACKAGE)-$(VERSION).tar.gz: dist + +# Rule to build RPM distribution package +rpm: $(PACKAGE)-$(VERSION).tar.gz + cp $(PACKAGE)-$(VERSION).tar.gz /usr/src/redhat/SOURCES + rpm -ba SDL_mixer.spec + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/SDL_mixer.spec.in b/SDL_mixer.spec.in new file mode 100644 index 00000000..1b370358 --- /dev/null +++ b/SDL_mixer.spec.in @@ -0,0 +1,68 @@ +%define name @PACKAGE@ +%define version @VERSION@ +%define release 1 + +Summary: Simple DirectMedia Layer - Sample Mixer Library +Name: %{name} +Version: %{version} +Release: %{release} +Source0: %{name}-%{version}.tar.gz +Copyright: LGPL +Group: System Environment/Libraries +BuildRoot: /var/tmp/%{name}-buildroot +Prefix: %{_prefix} +BuildRequires: SDL-devel + +%description +Due to popular demand, here is a simple multi-channel audio mixer. +It supports 4 channels of 16 bit stereo audio, plus a single channel +of music, mixed by the popular MikMod MOD, Timidity MIDI and SMPEG MP3 +libraries. + +%package devel +Summary: Libraries, includes and more to develop SDL applications. +Group: Development/Libraries +Requires: %{name} +Requires: SDL-devel + +%description devel +Due to popular demand, here is a simple multi-channel audio mixer. +It supports 4 channels of 16 bit stereo audio, plus a single channel +of music, mixed by the popular MikMod MOD, Timidity MIDI and SMPEG MP3 +libraries. + +%prep +%setup + +%build +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} +uname -a |grep -qi SMP && make -j2 || make + +%install +rm -rf $RPM_BUILD_ROOT +make install prefix=$RPM_BUILD_ROOT/%{prefix} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc README COPYING +%doc mikmod/AUTHORS mikmod/README mikmod/COPYING.LESSER +%doc timidity/FAQ timidity/README +%{prefix}/bin/playmus +%{prefix}/bin/playwave +%{prefix}/lib/lib*.so.* +%{prefix}/lib/lib*.so + +%files devel +%defattr(-,root,root) +%{prefix}/lib/*a +%{prefix}/include/SDL/ + +%changelog +* Wed Jan 19 2000 Sam Lantinga +- converted to get package information from configure +* Sun Jan 16 2000 Hakan Tandogan +- initial spec file + diff --git a/configure b/configure index c67784d3..b5671ee1 100755 --- a/configure +++ b/configure @@ -2424,6 +2424,7 @@ trap 'rm -fr `echo " Makefile mikmod/Makefile timidity/Makefile +SDL_mixer.spec " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF diff --git a/configure.in b/configure.in index 2cc2714f..144389c0 100644 --- a/configure.in +++ b/configure.in @@ -120,4 +120,5 @@ AC_OUTPUT([ Makefile mikmod/Makefile timidity/Makefile +SDL_mixer.spec ])