[packages/libfad] - new

qboosh qboosh at pld-linux.org
Thu Aug 30 20:24:21 CEST 2018


commit e517172c17c463240d5ac91c4530036405540b2c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Aug 30 20:27:00 2018 +0200

    - new

 libfad-dirs.patch        |  61 ++++++++++++++++++++++++++
 libfad-system-libs.patch | 103 +++++++++++++++++++++++++++++++++++++++++++
 libfad.spec              | 111 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 275 insertions(+)
---
diff --git a/libfad.spec b/libfad.spec
new file mode 100644
index 0000000..48302e0
--- /dev/null
+++ b/libfad.spec
@@ -0,0 +1,111 @@
+Summary:	Flash Animation Decode library
+Summary(pl.UTF-8):	Biblioteka Flash Animation Decode - dekodowanie animacji Flash
+Name:		libfad
+Version:	0.9.6
+Release:	1
+License:	LGPL v2+
+Group:		Libraries
+Source0:	http://downloads.sourceforge.net/fad/%{name}-%{version}.tar.bz2
+# Source0-md5:	13e2b5df91f1627a8c5cdab573784aab
+Patch0:		%{name}-system-libs.patch
+Patch1:		%{name}-dirs.patch
+URL:		http://fad.sourceforge.net/
+BuildRequires:	SDL-devel >= 1.2.8
+BuildRequires:	cairo-devel >= 0.9.2
+BuildRequires:	libjpeg-devel >= 6b
+BuildRequires:	libmad-devel >= 0.15.1b
+BuildRequires:	zlib-devel >= 1.2.3
+Requires:	cairo >= 0.9.2
+Requires:	libjpeg >= 6b
+Requires:	libmad >= 0.15.1b
+Requires:	zlib >= 1.2.3
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libFAD is a Flash Animation Decode library.
+
+%description -l pl.UTF-8
+libFAD (Flash Animation Decode) to biblioteka do dekodowania animacji
+Flash.
+
+%package devel
+Summary:	Header files for libFAD library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libFAD
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	cairo-devel >= 0.9.2
+
+%description devel
+Header files for libFAD library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libFAD.
+
+%package static
+Summary:	Static libFAD library
+Summary(pl.UTF-8):	Statyczna biblioteka libFAD
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static libFAD library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libFAD.
+
+%package player
+Summary:	SDL based Flash Animation Player
+Summary(pl.UTF-8):	Odtwarzacz animacji Flash oparty na SDL
+Group:		Applications/Graphics
+Requires:	%{name} = %{version}-%{release}
+Requires:	SDL >= 1.2.8
+
+%description player
+SDL based Flash Animation Player.
+
+%description player -l pl.UTF-8
+Odtwarzacz animacji Flash oparty na SDL.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__make} \
+	CC="%{__cc}" \
+	DEBUG="%{rpmcflags} %{rpmcppflags} -DLIBFAD_DO_RENDER"
+	DEBUG_CFLAGS="%{rpmcflags} %{rpmcppflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX=%{_prefix} \
+	LIBDIR=%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CREDITS ChangeLog README
+%attr(755,root,root) %{_libdir}/libfad.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfad.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libfad.so
+%{_includedir}/fad.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libfad.a
+
+%files player
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/fap
diff --git a/libfad-dirs.patch b/libfad-dirs.patch
new file mode 100644
index 0000000..8199363
--- /dev/null
+++ b/libfad-dirs.patch
@@ -0,0 +1,61 @@
+--- libfad-0.9.6/src/Makefile.orig	2018-08-30 18:18:26.332943742 +0200
++++ libfad-0.9.6/src/Makefile	2018-08-30 18:24:06.672939854 +0200
+@@ -1,5 +1,8 @@
+ VER=0.9.6
++DESTDIR=
+ PREFIX=/usr/local
++INCLUDEDIR=$(PREFIX)/include
++LIBDIR=$(PREFIX)/lib
+ 
+ OBJS=fad.bitmap.o fad.bits.o fad.button.o fad.dl.o fad.dynarray.o \
+ 		 fad.fontext.o fad.frame.o fad.jpeg.o fad.shape.o fad.morph.o \
+@@ -39,17 +42,17 @@
+ 	rm $(OBJS) *.txt *.bak *.copy $(SHAREDLIBM) $(SHAREDLIBV) $(SHAREDLIB) $(STATICLIB) -f
+ 
+ install: $(SHAREDLIBV)
+-	- at if [ ! -d $(PREFIX)/include ]; then mkdir -p $(PREFIX)/include; fi
+-	- at if [ ! -d $(PREFIX)/lib ]; then mkdir -p $(PREFIX)/lib; fi
+-	cp fad.h $(PREFIX)/include
+-	cp $(SHAREDLIBV) $(PREFIX)/lib
+-	- at if [ ! -f $(SHAREDLIB) ]; then \
+-	cd $(PREFIX)/lib; \
++	- at if [ ! -d $(DESTDIR)$(INCLUDEDIR) ]; then mkdir -p $(DESTDIR)$(PREFIX)/include; fi
++	- at if [ ! -d $(DESTDIR)$(LIBDIR) ]; then mkdir -p $(DESTDIR)$(LIBDIR); fi
++	cp fad.h $(DESTDIR)$(INCLUDEDIR)
++	cp $(SHAREDLIBV) $(STATICLIB) $(DESTDIR)$(LIBDIR)
++	- at if [ ! -f $(DESTDIR)$(LIBDIR)$(SHAREDLIB) ]; then \
++	cd $(DESTDIR)$(LIBDIR); \
+ 		ln -s $(SHAREDLIBV) $(SHAREDLIB); \
+ 		ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
+ 	fi
+ 
+ uninstall:
+-	rm $(PREFIX)/include/fad.h \
+-	cd $(PREFIX)/lib; \
+-	rm $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM)
++	rm $(DESTDIR)$(INCLUDEDIR)/fad.h \
++	cd $(DESTDIR)$(LIBDIR); \
++	rm $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM) $(STATICLIB)
+--- libfad-0.9.6/player/Makefile.orig	2006-09-12 22:06:23.000000000 +0200
++++ libfad-0.9.6/player/Makefile	2018-08-30 18:37:48.349597141 +0200
+@@ -1,3 +1,7 @@
++DESTDIR=
++PREFIX=/usr/local
++BINDIR=$(PREFIX)/bin
++
+ PLAYER=fap
+ 
+ #DEBUG_CFLAGS= -g
+@@ -35,9 +39,9 @@
+ 	rm fap *.o *.txt *.bak *.out .svn/ -rf
+ 
+ install: $(SHAREDLIBV)
+-	- at if [ ! -d $(PREFIX)/bin ]; then mkdir -p $(PREFIX)/bin; fi
+-	cp fap $(PREFIX)/bin
++	- at if [ ! -d $(DESTDIR)$(BINDIR) ]; then mkdir -p $(DESTDIR)$(BINDIR); fi
++	cp fap $(DESTDIR)$(BINDIR)
+ 
+ uninstall:
+-	cd $(PREFIX)/bin; \
++	cd $(DESTDIR)$(BINDIR); \
+ 	rm fap
diff --git a/libfad-system-libs.patch b/libfad-system-libs.patch
new file mode 100644
index 0000000..441dbcd
--- /dev/null
+++ b/libfad-system-libs.patch
@@ -0,0 +1,103 @@
+--- libfad-0.9.6/src/Makefile.orig	2006-09-19 17:46:49.000000000 +0200
++++ libfad-0.9.6/src/Makefile	2018-08-30 18:09:21.536283300 +0200
+@@ -5,60 +5,6 @@
+ 		 fad.fontext.o fad.frame.o fad.jpeg.o fad.shape.o fad.morph.o \
+ 		 fad.sound.o fad.sprite.o fad.stream.o fad.utils.o fad.render.o
+ 
+-ZLIB_SUBDIR=zlib
+-JPEG_SUBDIR=jpeg
+-LIBMAD_SUBDIR=libmad
+-
+-ZLIB_OBJS=$(ZLIB_SUBDIR)/adler32.o \
+-					$(ZLIB_SUBDIR)/crc32.o \
+-					$(ZLIB_SUBDIR)/zutil.o \
+-					$(ZLIB_SUBDIR)/trees.o \
+-					$(ZLIB_SUBDIR)/inffast.o \
+-					$(ZLIB_SUBDIR)/inftrees.o \
+-					$(ZLIB_SUBDIR)/infback.o \
+-					$(ZLIB_SUBDIR)/inflate.o \
+-					$(ZLIB_SUBDIR)/uncompr.o
+-
+-
+-JPEG_OBJS=$(JPEG_SUBDIR)/jdapistd.o \
+-					$(JPEG_SUBDIR)/jdcolor.o \
+-					$(JPEG_SUBDIR)/jdcoefct.o \
+-					$(JPEG_SUBDIR)/jdatasrc.o \
+-					$(JPEG_SUBDIR)/jddctmgr.o \
+-					$(JPEG_SUBDIR)/jdmarker.o \
+-					$(JPEG_SUBDIR)/jdpostct.o \
+-					$(JPEG_SUBDIR)/jdinput.o \
+-					$(JPEG_SUBDIR)/jidctred.o \
+-					$(JPEG_SUBDIR)/jdhuff.o \
+-					$(JPEG_SUBDIR)/jdphuff.o \
+-					$(JPEG_SUBDIR)/jidctflt.o \
+-					$(JPEG_SUBDIR)/jutils.o \
+-					$(JPEG_SUBDIR)/jidctfst.o \
+-					$(JPEG_SUBDIR)/jcomapi.o \
+-					$(JPEG_SUBDIR)/jquant1.o \
+-					$(JPEG_SUBDIR)/jquant2.o \
+-					$(JPEG_SUBDIR)/jdapimin.o \
+-					$(JPEG_SUBDIR)/jidctint.o \
+-					$(JPEG_SUBDIR)/jmemmgr.o \
+-					$(JPEG_SUBDIR)/jmemname.o \
+-					$(JPEG_SUBDIR)/jdmaster.o \
+-					$(JPEG_SUBDIR)/jdsample.o \
+-					$(JPEG_SUBDIR)/jdtrans.o \
+-					$(JPEG_SUBDIR)/jdmainct.o \
+-					$(JPEG_SUBDIR)/jdatadst.o \
+-					$(JPEG_SUBDIR)/jdmerge.o \
+-					$(JPEG_SUBDIR)/jerror.o
+-
+-LIBMAD_OBJS=$(LIBMAD_SUBDIR)/bit.o \
+-						$(LIBMAD_SUBDIR)/fixed.o \
+-						$(LIBMAD_SUBDIR)/frame.o \
+-						$(LIBMAD_SUBDIR)/huffman.o \
+-						$(LIBMAD_SUBDIR)/layer12.o \
+-						$(LIBMAD_SUBDIR)/layer3.o \
+-						$(LIBMAD_SUBDIR)/stream.o \
+-						$(LIBMAD_SUBDIR)/synth.o \
+-						$(LIBMAD_SUBDIR)/timer.o
+-
+ LIBMAD_CFLAGS=-DFPM_INTEL
+ 
+ DEBUG=-g -DLIBFAD_DO_RENDER #-DLIBFAD_DEBUG # -DLIBFAD_DEBUG # -DLIBFAD_DEBUG
+@@ -75,32 +21,22 @@
+ 
+ SHAREDLIBV=libfad.so.$(VER)
+ 
+-all:$(SHAREDLIBV)
++all:$(SHAREDLIBV) $(STATICLIB)
+ 	- at if [ ! -f $(SHAREDLIB) ]; then ln -s $(SHAREDLIBV) $(SHAREDLIB); fi
+ 	- at if [ ! -f $(SHAREDLIBM) ]; then ln -s $(SHAREDLIBV) $(SHAREDLIBM); fi
+ 
+-$(SHAREDLIBV): $(ZLIB_OBJS) $(JPEG_OBJS) $(LIBMAD_OBJS) $(OBJS)
+-	$(CC) $(LDFLAGS) -o $(SHAREDLIBV) $(OBJS) $(JPEG_OBJS) $(ZLIB_OBJS) $(LIBMAD_OBJS)
+-#	$(AR) -r $(STATICLIB) $(OBJS) $(JPEG_OBJS) $(ZLIB_OBJS)
++$(SHAREDLIBV): $(OBJS)
++	$(CC) $(LDFLAGS) -o $(SHAREDLIBV) $(OBJS) -ljpeg -lz -lmad
++
++$(STATICLIB): $(OBJS)
++	$(AR) -r $(STATICLIB) $(OBJS)
+ 
+ #compile libFAD source code
+ fad.%.o: fad.%.c
+ 	$(CC) $(CFLAGS) -c $< -o $@
+ 
+-#compile ZLIB source code
+-$(ZLIB_SUBDIR)/%.o: $(ZLIB_SUBDIR)/%.c
+-	$(CC) -c $< -o $@
+-
+-#compile JPEG source code
+-$(JPEG_SUBDIR)/%.o: $(JPEG_SUBDIR)/%.c
+-	$(CC) -c $< -o $@
+-
+-#compile libmad source code
+-$(LIBMAD_SUBDIR)/%.o: $(LIBMAD_SUBDIR)/%.c
+-	$(CC) $(LIBMAD_CFLAGS) -c $< -o $@
+-
+ clean:
+-	rm $(OBJS) $(ZLIB_OBJS) $(JPEG_OBJS) $(LIBMAD_OBJS) *.txt *.bak *.copy $(SHAREDLIBM) $(SHAREDLIBV) $(SHAREDLIB) $(STATICLIB) -f
++	rm $(OBJS) *.txt *.bak *.copy $(SHAREDLIBM) $(SHAREDLIBV) $(SHAREDLIB) $(STATICLIB) -f
+ 
+ install: $(SHAREDLIBV)
+ 	- at if [ ! -d $(PREFIX)/include ]; then mkdir -p $(PREFIX)/include; fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libfad.git/commitdiff/e517172c17c463240d5ac91c4530036405540b2c



More information about the pld-cvs-commit mailing list