%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0) %define with_python_binding 1 Name: libming Version: 0.4.4 Release: 1mamba Summary: Ming is a library for generating Macromedia Flash files (.swf) Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Stefano Cotta Ramusino URL: http://ming.sourceforge.net/ Source: http://downloads.sourceforge.net/sourceforge/ming/ming-%{version}.tar.bz2 Patch0: %{name}-0.4.2-php_install.patch Patch1: libming-0.4.4-perl-5.16.patch Patch2: libming-0.4.4-libtcl-0.8.5.patch #Source1: http://downloads.sourceforge.net/sourceforge/ming/ming-perl-%{version}-beta5.tar.gz #Source2: http://downloads.sourceforge.net/sourceforge/ming/ming-py-%{version}-beta5.tar.gz License: LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libbzip2-devel BuildRequires: libfreetype-devel BuildRequires: libpng-devel BuildRequires: libpython-devel BuildRequires: libungif-devel BuildRequires: libz-devel BuildRequires: perl-devel ## AUTOBUILDREQ-END BuildRequires: perl-devel >= %{perl_major_ver} %if "%{stage1}" != "1" BuildRequires: php-devel %endif BuildRequires: python >= 2.4 BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Ming is a C library for generating SWF ("Flash") format movies, plus a set of wrappers for using the library from C++ and popular scripting languages like PHP, Perl, Python, and Ruby. %package devel Group: Development/Libraries Summary: Static libraries and headers for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description devel Ming is a C library for generating SWF ("Flash") format movies, plus a set of wrappers for using the library from C++ and popular scripting languages like PHP, Perl, Python, and Ruby. This package contains static libraries and header files need for development. %package -n ming-utils Group: Applications/Multimedia Summary: Ming utilities License: GPL Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description -n ming-utils Ming is a C library for generating SWF ("Flash") format movies, plus a set of wrappers for using the library from C++ and popular scripting languages like PHP, Perl, Python, and Ruby. This package contains some Ming utilities: - makeswf: compile actionscript code into an .swf movie - listswf: swf format disassembler - listaction: show actionscript in the swf - swftophp: attempt to make a php/ming script out of an swf file %package -n perl-ming Group: Development/Libraries/Perl Summary: Perl bindings for Ming Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: perl >= %{perl_major_ver} Provides: ming-perl Obsoletes: ming-perl %description -n perl-ming Ming is a C library for generating SWF ("Flash") format movies, plus a set of wrappers for using the library from C++ and popular scripting languages like PHP, Perl, Python, and Ruby. This package contains Perl bindings for Ming. %package -n php-ming Group: System/Libraries/PHP Summary: PHP bindings for Ming Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: php %description -n php-ming Ming is a C library for generating SWF ("Flash") format movies, plus a set of wrappers for using the library from C++ and popular scripting languages like PHP, Perl, Python, and Ruby. This package contains PHP bindings for Ming. %package -n ming-tcl Group: Development/Libraries Summary: TCL bindings for Ming Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description -n ming-tcl Ming is a C library for generating SWF ("Flash") format movies, plus a set of wrappers for using the library from C++ and popular scripting languages like PHP, Perl, Python, and Ruby. This package contains TCL bindings for Ming. %if %{with_python_binding} %package -n python-ming Group: Development/Libraries/Python Summary: Python bindings for Ming Requires: python >= %{pyver} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Provides: ming-python Obsoletes: ming-python %description -n python-ming Ming is a C library for generating SWF ("Flash") format movies, plus a set of wrappers for using the library from C++ and popular scripting languages like PHP, Perl, Python, and Ruby. This package contains Python bindings for Ming. %endif %prep %setup -q -n ming-%{version} #%patch0 -p1 %patch1 -p1 %patch2 -p1 %build %configure \ --enable-python \ --enable-perl \ %if "%{stage1}" != "1" --enable-php \ %endif --enable-tcl \ PYTHON=%{__python} %make -j1 #pushd perl_ext #perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor #% make OPTIMIZE="%{optflags}" #% make test #popd #% if %{with_python_binding} #pushd py_ext #python setup.py build #popd #% endif %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall install src/ming_config.h %{buildroot}%{_includedir}/ming_config.h #% makeinstall_perl -C perl_ext packlist=`find %{buildroot} -name .packlist` [ -z "$packlist" ] && exit 1 || cat $packlist | \ sed "s,%{buildroot},,g;s,.*/man/.*,&.gz,g" | \ sort -u > .packlist && rm $packlist find %{buildroot}/usr/lib/perl5/ \ \( -name perllocal.pod -or -name .packlist \) \ -exec rm -f {} \; strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'` for dir in `find %{buildroot} -type d | grep $strid`; do echo "%dir ${dir#%buildroot}" >> .packlist done #%if %{with_python_binding} #pushd py_ext #python setup.py install \ # --root=%{buildroot} \ # --install-headers=%{_includedir}/python \ # --install-lib=%{_libdir}/site-python #popd #%endif %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" rm -f .packlist %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %{_libdir}/*.so.* #%{_mandir}/man1/* %doc LICENSE %files devel %defattr(-,root,root) %{_bindir}/ming-config %{_includedir}/*.h %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/libming.pc #%{_mandir}/man3/*.3.gz %doc NEWS README TODO %files -n ming-utils %defattr(-,root,root) %{_bindir}/dbl2png %{_bindir}/gif2dbl %{_bindir}/gif2mask #%{_bindir}/img2swf %{_bindir}/listaction_d %{_bindir}/listswf_d %{_bindir}/makeswf %{_bindir}/png2dbl %{_bindir}/raw2adpcm %{_bindir}/swftocxx %{_bindir}/swftoperl %{_bindir}/swftotcl %{_bindir}/swftopython %{_bindir}/listaction %{_bindir}/listfdb %{_bindir}/listjpeg %{_bindir}/listmp3 %{_bindir}/listswf %{_bindir}/makefdb %{_bindir}/swftophp #%{_bindir}/ttftofft %doc util/{README,TODO} %files -n perl-ming -f .packlist %defattr(-,root,root) %doc perl_ext/{README,TODO} %if %{with_python_binding} %files -n python-ming %defattr(-,root,root) %{python_sitelib}/_mingc.so %{python_sitelib}/ming.py %{python_sitelib}/ming.pyc %{python_sitelib}/mingc.py %{python_sitelib}/mingc.pyc %{python_sitelib}/mingc-%{version}-py2.6.egg-info %doc py_ext/{README,TODO} %endif %if "%{stage1}" != "1" %files -n php-ming %defattr(-,root,root) %{_libdir}/php/extensions/ming.so %endif %files -n ming-tcl %defattr(-,root,root) %{_libdir}/ming/tcl/mingc.a %{_libdir}/ming/tcl/mingc.la %{_libdir}/ming/tcl/mingc.so %changelog * Wed Dec 12 2012 Silvan Calarco 0.4.4-1mamba - update to 0.4.4 * Tue Jun 22 2010 Automatic Build System 0.4.3-1mamba - automatic update by autodist * Wed Jan 20 2010 Silvan Calarco 0.4.2-3mamba - install ming_config.h as required by pstoedit * Tue Nov 18 2008 Silvan Calarco 0.4.2-2mamba - automatic rebuild by autodist * Tue Nov 18 2008 Silvan Calarco 0.4.2-1mamba - update to 0.4.2 * Mon Dec 03 2007 Silvan Calarco 0.4.0-1mamba - update to 0.4.0 (beta5) * Fri Nov 03 2006 Stefano Cotta Ramusino 0.3.0-1qilnx - package created by autospec