diff --git a/.gitignore b/.gitignore index e69de29..1d37104 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/xmp-plugin-audacious-4.0.0-8c492d7.tar.gz diff --git a/sources b/sources index e69de29..78c76e9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c54db89a406ccd228d9b291526f7b5ea xmp-plugin-audacious-4.0.0-8c492d7.tar.gz diff --git a/xmp-plugin-audacious-rpm.patch b/xmp-plugin-audacious-rpm.patch new file mode 100644 index 0000000..3fcc055 --- /dev/null +++ b/xmp-plugin-audacious-rpm.patch @@ -0,0 +1,35 @@ +diff -up xmp-plugin-audacious-8c492d73aceacd2c98d42cd8936ea73d74a8c033/Makefile.r xmp-plugin-audacious-8c492d73aceacd2c98d42cd8936ea73d74a8c033/Makefile +--- xmp-plugin-audacious-8c492d73aceacd2c98d42cd8936ea73d74a8c033/Makefile.r 2013-06-26 23:56:27.000000000 +0200 ++++ xmp-plugin-audacious-8c492d73aceacd2c98d42cd8936ea73d74a8c033/Makefile 2013-07-12 01:37:24.366961927 +0200 +@@ -1,7 +1,8 @@ + VERSION = 4.0.0 + + CC = gcc +-CFLAGS = -c -Wall -g -O2 -fPIC -D_REENTRANT \ ++OPTFLAGS = -g -O2 ++CFLAGS = -c -Wall $(OPTFLAGS) -fPIC -D_REENTRANT \ + `pkg-config --cflags libxmp audacious glib-2.0` + LD = gcc + LDFLAGS = +@@ -16,6 +17,7 @@ DIST = audacious-plugin-xmp-$(VERSION) + DFILES = README INSTALL COPYING CREDITS Changelog configure \ + install-sh configure.ac Makefile.in + DDIRS = ++OBJS = audacious3.lo + + all: binaries + +@@ -41,11 +43,11 @@ clean: + install: install-plugin + + install-plugin: +- $(INSTALL) ++ $(INSTALL) -D xmp-audacious3.so $(DESTDIR)$(PLUGIN_DIR)/xmp-audacious3.so + + depend: + @echo Building dependencies... +- @$(CC) $(CFLAGS) -MM $(OBJS:.o=.c) > $@ ++ @$(CC) $(CFLAGS) -MM $(OBJS:.lo=.c) > $@ + + dist: dist-prepare dist-subdirs + diff --git a/xmp-plugin-audacious.spec b/xmp-plugin-audacious.spec new file mode 100644 index 0000000..f49b5e7 --- /dev/null +++ b/xmp-plugin-audacious.spec @@ -0,0 +1,61 @@ +%global commit 8c492d73aceacd2c98d42cd8936ea73d74a8c033 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +%define audacious_input_plugin_dir %(pkg-config --variable=input_plugin_dir audacious) + +%global aud_plugin_api %(grep '[ ]*#define[ ]*_AUD_PLUGIN_VERSION[ ]\\+' %{_includedir}/audacious/plugin.h 2>/dev/null | sed 's!.*_AUD_PLUGIN_VERSION[ ]*\\([0-9]\\+\\).*!\\1!') +%if 0%{aud_plugin_api} > 0 +%global aud_plugin_dep Requires: audacious(plugin-api)%{?_isa} = %{aud_plugin_api} +%endif + +Name: xmp-plugin-audacious +Version: 4.0.0 +Release: 0.1.%{shortcommit}%{?dist} +Summary: Multi-format module playback plugin for Audacious using libxmp +Group: Applications/Multimedia +Source0: https://github.com/cmatsuoka/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz +Patch0: %{name}-rpm.patch +License: GPLv2+ +URL: http://xmp.sourceforge.net/ +BuildRequires: audacious-devel +BuildRequires: libxmp-devel +%if 0%{?fedora} > 13 +%{?aud_plugin_dep} +%else +Requires: audacious +%endif +Provides: audacious-plugin-xmp = %{version}-%{release} +Obsoletes: audacious-plugin-xmp < 3.5.0-4 + +%description +Libxmp is a library that renders module files to PCM data. It supports +over 90 mainstream and obscure module formats including Protracker (MOD), +Scream Tracker 3 (S3M), Fast Tracker II (XM), and Impulse Tracker (IT). + +Many compressed module formats are supported, including popular Unix, DOS, +and Amiga file packers including gzip, bzip2, SQSH, PowerPacker, etc. + +This package contains the xmp plugin for the Audacious media player. + +%prep +%if 0%{?fedora} > 13 +# Enforce availability of the audacious(plugin-api) dependency. +%{!?aud_plugin_dep:echo 'No audacious(plugin-api) dependency!' && exit -1} +%endif + +%setup -qn %{name}-%{commit} +%patch0 -p1 -b .r + +%build +make OPTFLAGS="%{optflags}" V=1 %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} + +%files +%doc COPYING +%{audacious_input_plugin_dir}/* + +%changelog +* Fri Jul 12 2013 Dominik Mierzejewski - 4.0.0-0.1.8c492d7 +- initial build based loosely on xmp.spec