summaryrefslogtreecommitdiffstats
path: root/goattracker.spec
blob: 978aa3123e151106a0572456920b39d32b57458e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Name:		goattracker
Version:	2.68
Release:	0.1%{?dist}
Summary:	Music editor for creating Commodore 64 music

Group:		Applications/Multimedia
License:	GPLv2+
URL:		http://sourceforge.net/projects/goattracker2/
# Original source location:
#  * http://prdownloads.sourceforge.net/goattracker2/GoatTracker_%{version}.zip
#  * http://prdownloads.sourceforge.net/goattracker2/GoatTracker_%{version}_Stereo.zip
# 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}.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:	SDL-devel
#Requires:	

%description


%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 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 -f "$PWD/Makefile-src" -C src \
     install DESTDIR="$RPM_BUILD_ROOT" BINDIR="%{_bindir}"


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%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