summaryrefslogtreecommitdiffstats
path: root/goattracker.spec
diff options
context:
space:
mode:
Diffstat (limited to 'goattracker.spec')
-rw-r--r--goattracker.spec37
1 files changed, 30 insertions, 7 deletions
diff --git a/goattracker.spec b/goattracker.spec
index a413e23..978aa31 100644
--- a/goattracker.spec
+++ b/goattracker.spec
@@ -12,10 +12,13 @@ URL: http://sourceforge.net/projects/goattracker2/
# These zipfiles need to be cleaned of executables, and as that means we need
# to repackage them anyway, we can use .tar.xz for that.
# Run "./cleanup-sources.sh 2.68" for
-Source0: %{name}-%{version}-cleaned-up.tar.xz
+Source0: %{name}-%{version}.tar.xz
+# We need our own make files. The existing ones strip binaries, drop cflags, etc
+Source10: Makefile-bme
+Source11: Makefile-src
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-#BuildRequires:
+BuildRequires: SDL-devel
#Requires:
%description
@@ -23,16 +26,30 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%prep
%setup -q
+cp %{SOURCE10} Makefile-bme
+cp %{SOURCE11} Makefile-src
+sed -i \
+ -e '/^ strip $@/d' \
+ -e '/^CC=/d' \
+ -e '/^CXX=/d' \
+ -e's/^ \(datafile\|dat2inc\) / .\/bme\/\1 /' \
+ src/makefile.common
%build
-%configure
-make %{?_smp_mflags}
+#configure
+make CFLAGS="%{optflags}" -f "$PWD/Makefile-bme" -C src/bme %{?_smp_mflags}
+make \
+ CFLAGS="%{optflags} -Wall -Ibme -Iasm" \
+ SDL_CFLAGS="$(sdl-config --cflags)" \
+ SDL_LIBS="$(sdl-config --libs)" \
+ -f "$PWD/Makefile-src" -C src %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+make -f "$PWD/Makefile-src" -C src \
+ install DESTDIR="$RPM_BUILD_ROOT" BINDIR="%{_bindir}"
%clean
@@ -41,8 +58,14 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
-%doc
-
+%doc authors copying readme.txt
+%doc readme_sdl.txt readme_resid.txt
+%doc goat_tracker_commands.pdf
+%{_bindir}/betaconv
+%{_bindir}/goattrk2
+%{_bindir}/ins2snd2
+%{_bindir}/mod2sng
+%{_bindir}/sngspli2
%changelog