]> git.pld-linux.org Git - packages/asap.git/commitdiff
- new master
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 13 Apr 2013 07:22:49 +0000 (09:22 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 13 Apr 2013 07:22:49 +0000 (09:22 +0200)
asap-make.patch [new file with mode: 0644]
asap.spec [new file with mode: 0644]

diff --git a/asap-make.patch b/asap-make.patch
new file mode 100644 (file)
index 0000000..104aad6
--- /dev/null
@@ -0,0 +1,90 @@
+--- asap-3.1.3/Makefile.orig   2012-09-08 11:07:08.000000000 +0200
++++ asap-3.1.3/Makefile        2013-04-13 07:42:52.750361640 +0200
+@@ -1,11 +1,18 @@
+ prefix := /usr/local
++libdir := $(prefix)/lib
+ srcdir := $(dir $(lastword $(MAKEFILE_LIST)))
+-CC = $(DO)gcc -s -O2 -Wall -o $@ $(if $(filter %.so,$@),-shared -fPIC) $(INCLUDEOPTS) $(filter %.c,$^)
+-AR = $(DO)ar rc $@ $^
++CC=gcc
++CFLAGS="-O2 -Wall"
++LDFLAGS="-s"
++LIBTOOL=libtool
++COMPLINK = $(DO)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(if $(filter %.so,$@),-shared -fPIC) $(INCLUDEOPTS) $(CPPFLAGS) $(filter %.c,$^)
++LTCOMPILE = $(DO)$(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CFLAGS) -o $@ $(INCLUDEOPTS) $(CPPFLAGS) $(filter %.c,$^)
++LIBLINK = $(DO)$(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ -rpath $(libdir)
+ CITO = $(DO)cito.exe -o $@ $(patsubst %,-I %,$(sort $(dir $(filter-out %.ci,$^)))) $(filter %.ci,$^)
+ INSTALL = install
+ INSTALL_PROGRAM = mkdir -p $(DESTDIR)$(2) && $(INSTALL) $(1) $(DESTDIR)$(2)/$(1)
+ INSTALL_DATA = mkdir -p $(DESTDIR)$(2) && $(INSTALL) -m 644 $(1) $(DESTDIR)$(2)/$(1)
++LTINSTALL = mkdir -p $(DESTDIR)$(2) && $(LIBTOOL) --mode=install $(INSTALL) $(1) $(DESTDIR)$(2)/$(1)
+ ASCIIDOC = $(DO)asciidoc -o - $(1) $< | sed -e "s/527bbd;/c02020;/" | xmllint --valid --nonet -o $@ -
+ SDL_CFLAGS = `sdl-config --cflags`
+ SDL_LIBS = `sdl-config --libs`
+@@ -27,7 +34,7 @@
+ CLEAN :=
+ CLEANDIR :=
+-all: asapconv libasap.a
++all: asapconv libasap.la
+ .PHONY: all
+ install: install-asapconv install-lib
+@@ -41,7 +48,7 @@
+ # asapconv
+ asapconv: $(call src,asapconv.c asap.[ch])
+-      $(CC)
++      $(COMPLINK)
+ CLEAN += asapconv
+ install-asapconv: asapconv
+@@ -54,20 +61,20 @@
+ # lib
+-lib: libasap.a
++lib: libasap.la
+ .PHONY: lib
+-libasap.a: asap.o
+-      $(AR)
+-CLEAN += libasap.a
+-
+-asap.o: $(call src,asap.[ch])
+-      $(CC) -c
+-CLEAN += asap.o
++libasap.la: asap.lo
++      $(LIBLINK)
++CLEAN += libasap.la
++
++asap.lo: $(call src,asap.[ch])
++      $(LTCOMPILE)
++CLEAN += asap.lo
+-install-lib: libasap.a $(srcdir)asap.h
++install-lib: libasap.la $(srcdir)asap.h
+       $(call INSTALL_DATA,$(srcdir)asap.h,$(prefix)/include)
+-      $(call INSTALL_DATA,libasap.a,$(prefix)/lib)
++      $(call LTINSTALL,libasap.la,$(libdir))
+ .PHONY: install-lib
+ uninstall-lib:
+@@ -77,7 +84,7 @@
+ # SDL
+ asap-sdl: $(call src,asap-sdl.c asap.[ch])
+-      $(CC) $(SDL_CFLAGS) $(SDL_LIBS)
++      $(COMPLINK) $(SDL_CFLAGS) $(SDL_LIBS)
+ CLEAN += asap-sdl
+ install-sdl: asap-sdl
+@@ -91,7 +98,7 @@
+ # asapscan
+ asapscan: $(srcdir)asapscan.c asap-asapscan.h
+-      $(CC)
++      $(COMPLINK)
+ CLEAN += asapscan asapscan.exe
+ asap-asapscan.h: $(call src,asap.ci asap6502.ci asapinfo.ci cpu6502.ci pokey.ci) $(ASM6502_PLAYERS_OBX) | asap-asapscan.c
diff --git a/asap.spec b/asap.spec
new file mode 100644 (file)
index 0000000..dd93fa4
--- /dev/null
+++ b/asap.spec
@@ -0,0 +1,116 @@
+# TODO: plugins, bindings?
+Summary:       ASAP - Another Slight Atari Player
+Summary(pl.UTF-8):     ASAP (Another Slight Atari Player) - jeszcze jeden odtwarzacz plików z Atari
+Name:          asap
+Version:       3.1.3
+Release:       1
+License:       GPL v2+
+Group:         Applications/Sound
+Source0:       http://downloads.sourceforge.net/asap/%{name}-%{version}.tar.gz
+# Source0-md5: ce136b58933a67154e43902fcf239d58
+Patch0:                %{name}-make.patch
+URL:           http://asap.sourceforge.net/
+BuildRequires: SDL-devel
+BuildRequires: libtool
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+ASAP is a player of Atari 8-bit music for modern computers and mobile
+devices. It emulates the POKEY sound chip and the 6502 processor.
+
+ASAP supports the following file formats: SAP, CMC, CM3, CMR, CMS,
+DMC, DLT, MPT, MPD, RMT, TMC, TM8, TM2, FC.
+
+The main package contains ASAP shared library and converter.
+
+%description -l pl.UTF-8
+ASAP to odtwarzacz muzyki z 8-bitowego Atari dla współczesnych
+komputerów i urządzeń przenośnych. Emuluje układ dźwiękowy POKEY i
+procesor 6502.
+
+ASAP obsługuje następujące formaty plików: SAP, CMC, CM3, CMR, CMS,
+DMC, DLT, MPT, MPD, RMT, TMC, TM8, TM2, FC.
+
+Główny pakiet zawiera bibliotekę współdzieloną i konwerter.
+
+%package devel
+Summary:       Header file for ASAP library
+Summary(pl.UTF-8):     Plik nagłówkowy biblioteki ASAP
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header file for ASAP library.
+
+%description devel -l pl.UTF-8
+Plik nagłówkowy biblioteki ASAP.
+
+%package static
+Summary:       Static ASAP library
+Summary(pl.UTF-8):     Statyczna biblioteka ASAP
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static ASAP library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka ASAP.
+
+%package sdl
+Summary:       SDL-based ASAP player
+Summary(pl.UTF-8):     Odtwarzacz ASAP oparty na SDL
+Group:         Applications/Sound
+
+%description sdl
+SDL-based ASAP player.
+
+%description sdl -l pl.UTF-8
+Odtwarzacz ASAP oparty na SDL.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__make} asapconv lib asap-sdl \
+       V=1 \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags} -Wall" \
+       CPPFLAGS="%{rpmcppflags}" \
+       LDFLAGS="%{rpmldflags}" \
+       libdir=%{_libdir}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install-asapconv install-lib install-sdl \
+       DESTDIR=$RPM_BUILD_ROOT \
+       prefix=%{_prefix} \
+       libdir=%{_libdir}
+
+# no dependencies
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libasap.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CREDITS NEWS README.html USAGE-WEB sap-format.txt
+%attr(755,root,root) %{_bindir}/asapconv
+%attr(755,root,root) %{_libdir}/libasap.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libasap.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libasap.so
+%{_includedir}/asap.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libasap.a
+
+%files sdl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/asap-sdl
This page took 0.029975 seconds and 4 git commands to generate.