libming/libming.spec

285 lines
8.2 KiB
RPMSpec
Raw Normal View History

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
%define with_python_binding 0
%define commit 50098023446a5412efcfbd40552821a8cba983a6
Name: libming
Version: 0.4.9
Release: 1mamba
Summary: Ming is a library for generating Macromedia Flash files (.swf)
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://ming.sourceforge.net/
Source: https://github.com/libming/libming.git/master@%{commit}/libming-%{version}.tar.bz2
Patch0: %{name}-0.4.2-php_install.patch
Patch1: libming-0.4.9-perl-5.16.patch
Patch2: libming-0.4.4-libtcl-0.8.5.patch
Patch3: libming-0.4.9-multilib.patch
Patch5: libming-0.4.9-pr145.patch
Patch6: libming-0.4.9-version.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libbrotli-devel
BuildRequires: libbzip2-devel
BuildRequires: libfreetype-devel
BuildRequires: libgif-devel
BuildRequires: libglib-devel
BuildRequires: libgraphite2-devel
BuildRequires: libharfbuzz-devel
BuildRequires: libpcre-devel
BuildRequires: libperl
BuildRequires: libpng-devel
BuildRequires: libz-devel
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: perl-devel >= %{perl_major_ver}
%if "%{stage1}" != "1"
BuildRequires: php-devel
%endif
%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 < 0.4.9
%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
%debug_package
%prep
%setup -q
%patch1 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
sed -i "s|lungif|lgif|" perl_ext/Makefile.*
./autogen.sh
%build
%configure \
--disable-silent-rules \
--disable-static \
--enable-cpp \
--enable-perl \
--disable-php \
--disable-python \
--disable-tcl \
PYTHON=%{__python3} \
CFLAGS="%{optflags} -fcommon"
%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}/libming.so.*
%doc LICENSE
%files devel
%defattr(-,root,root)
%{_bindir}/ming-config
%{_includedir}/*.h
%{_libdir}/libming.la
%{_libdir}/libming.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
* Fri May 07 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.9-1mamba
- update to 0.4.9
* Wed Dec 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.4-1mamba
- update to 0.4.4
* Tue Jun 22 2010 Automatic Build System <autodist@mambasoft.it> 0.4.3-1mamba
- automatic update by autodist
* Wed Jan 20 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.2-3mamba
- install ming_config.h as required by pstoedit
* Tue Nov 18 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.2-2mamba
- automatic rebuild by autodist
* Tue Nov 18 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.2-1mamba
- update to 0.4.2
* Mon Dec 03 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.0-1mamba
- update to 0.4.0 (beta5)
* Fri Nov 03 2006 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 0.3.0-1qilnx
- package created by autospec