commit 065a6774f6d914a64594a8f27f688a3a55c3810b
Author: Mohamed El Morabity <melmorabity(a)fedoraproject.org>
Date: Fri Feb 23 16:28:01 2018 +0100
- Spec cleanup
- Update for latest Python guidelines
swftools-0.9.1-prefix.patch | 80 -----------------------------------------
swftools-0.9.2-install.patch | 86 +++++++++++++++++++++++++++++++++++++-------
swftools-0.9.2-prefix.patch | 80 -----------------------------------------
swftools.spec | 48 ++++++++++++-------------
4 files changed, 96 insertions(+), 198 deletions(-)
---
diff --git a/swftools-0.9.2-install.patch b/swftools-0.9.2-install.patch
index ca00f86..92fa6a4 100644
--- a/swftools-0.9.2-install.patch
+++ b/swftools-0.9.2-install.patch
@@ -1,16 +1,78 @@
-diff -up swftools-0.9.2/swfs/Makefile.in.orig swftools-0.9.2/swfs/Makefile.in
---- swftools-0.9.2/swfs/Makefile.in.orig 2012-04-10 14:19:33.650083642 +0200
-+++ swftools-0.9.2/swfs/Makefile.in 2012-04-10 15:32:27.209976521 +0200
-@@ -41,10 +41,8 @@ install:
- $(INSTALL_DATA) ./PreLoaderTemplate.swf
$(DESTDIR)/$(pkgdatadir)/swfs/PreLoaderTemplate.swf
- $(INSTALL_DATA) ./tessel_loader.swf $(DESTDIR)/$(pkgdatadir)/swfs/tessel_loader.swf
- $(INSTALL_DATA) ./swft_loader.swf $(DESTDIR)/$(pkgdatadir)/swfs/swft_loader.swf
-- rm -f $(DESTDIR)/$(pkgdatadir)/swfs/default_viewer.swf -o -L
$(DESTDIR)/$(pkgdatadir)/swfs/default_viewer.swf
-- $(LN_S) $(DESTDIR)/$(pkgdatadir)/swfs/simple_viewer.swf
$(DESTDIR)/$(pkgdatadir)/swfs/default_viewer.swf
-- rm -f $(DESTDIR)/$(pkgdatadir)/swfs/default_loader.swf -o -L
$(DESTDIR)/$(pkgdatadir)/swfs/default_loader.swf
-- $(LN_S) $(DESTDIR)/$(pkgdatadir)/swfs/tessel_loader.swf
$(DESTDIR)/$(pkgdatadir)/swfs/default_loader.swf
+diff -up ./Makefile.common.in.orig ./Makefile.common.in
+--- ./Makefile.common.in.orig 2010-11-12 20:06:53.000000000 +0100
++++ ./Makefile.common.in 2018-02-23 16:13:00.498244016 +0100
+@@ -69,10 +69,10 @@ man1dir = $(mandir)/man1
+
+ # ------------------- defines -------------------------
+
+-INSTALL_BIN = echo installing $$file to $(bindir);$(INSTALL_PROGRAM) $$file
$(bindir)/`echo $$file|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed
's/$$/$(EXEEXT)/'`
+-UNINSTALL_BIN = ff=`echo $$file|sed 's/$(EXEEXT)$$//'|sed
'$(transform)'|sed 's/$$/$(EXEEXT)/'`;echo rm -f $(bindir)/$$ff;rm -f
$(bindir)/$$ff
+-INSTALL_MAN1 = ff=$(srcdir)/$$file.1; inst=`echo $$file | sed '$(transform)'`.1;
echo "$(INSTALL_DATA) $$ff $(man1dir)/$$inst"; $(INSTALL_DATA) $$ff
$(man1dir)/$$inst
+-UNINSTALL_MAN1 = ff=$(srcdir)/$$file.1; inst=`echo $$file | sed
'$(transform)'`.1; echo "rm -f $(man1dir)/$$inst"; rm -f
$(man1dir)/$$inst
++INSTALL_BIN = echo installing $$file to $(DESTDIR)$(bindir);$(INSTALL_PROGRAM) $$file
$(DESTDIR)/$(bindir)/`echo $$file|sed 's/$(EXEEXT)$$//'|sed
'$(transform)'|sed 's/$$/$(EXEEXT)/'`
++UNINSTALL_BIN = ff=`echo $$file|sed 's/$(EXEEXT)$$//'|sed
'$(transform)'|sed 's/$$/$(EXEEXT)/'`;echo rm -f
$(DESTDIR)/$(bindir)/$$ff;rm -f $(DESTDIR)/$(bindir)/$$ff
++INSTALL_MAN1 = ff=$(srcdir)/$$file.1; inst=`echo $$file | sed '$(transform)'`.1;
echo "$(INSTALL_DATA) $$ff $(DESTDIR)/$(man1dir)/$$inst"; $(INSTALL_DATA) $$ff
$(DESTDIR)/$(man1dir)/$$inst
++UNINSTALL_MAN1 = ff=$(srcdir)/$$file.1; inst=`echo $$file | sed
'$(transform)'`.1; echo "rm -f $(man1dir)/$$inst"; rm -f
$(DESTDIR)/$(man1dir)/$$inst
+
+ #%.o: %.c
+ # $(C) $< -o $@
+diff -up ./src/Makefile.in.orig ./src/Makefile.in
+--- ./src/Makefile.in.orig 2018-02-23 16:14:24.951532590 +0100
++++ ./src/Makefile.in 2018-02-23 16:14:45.183603506 +0100
+@@ -134,8 +134,8 @@ swfc$(E): parser.$(O) swfc.$(O) swfc-fee
+ $(STRIP) $@
+
+ install:
+- $(mkinstalldirs) $(bindir)
+- $(mkinstalldirs) $(man1dir)
++ $(mkinstalldirs) $(DESTDIR)/$(bindir)
++ $(mkinstalldirs) $(DESTDIR)/$(man1dir)
+ @for file in $(install_programs); do if test -f $$file;then
$(INSTALL_BIN);$(INSTALL_MAN1);fi;done
+
+ uninstall:
+diff -up ./swfs/Makefile.in.orig ./swfs/Makefile.in
+--- ./swfs/Makefile.in.orig 2012-04-08 19:25:26.000000000 +0200
++++ ./swfs/Makefile.in 2018-02-23 16:18:36.604465653 +0100
+@@ -34,26 +34,24 @@ PreLoaderTemplate.swf: $(programs)
+ ./PreLoaderTemplate$(E) || true
+
+ install:
+- $(mkinstalldirs) $(pkgdatadir)
+- $(mkinstalldirs) $(pkgdatadir)/swfs
+- $(INSTALL_DATA) ./simple_viewer.swf $(pkgdatadir)/swfs/simple_viewer.swf
+- $(INSTALL_DATA) ./keyboard_viewer.swf $(pkgdatadir)/swfs/keyboard_viewer.swf
+- $(INSTALL_DATA) ./PreLoaderTemplate.swf $(pkgdatadir)/swfs/PreLoaderTemplate.swf
+- $(INSTALL_DATA) ./tessel_loader.swf $(pkgdatadir)/swfs/tessel_loader.swf
+- $(INSTALL_DATA) ./swft_loader.swf $(pkgdatadir)/swfs/swft_loader.swf
+- rm -f $(pkgdatadir)/swfs/default_viewer.swf -o -L
$(pkgdatadir)/swfs/default_viewer.swf
+- $(LN_S) $(pkgdatadir)/swfs/simple_viewer.swf $(pkgdatadir)/swfs/default_viewer.swf
+- rm -f $(pkgdatadir)/swfs/default_loader.swf -o -L
$(pkgdatadir)/swfs/default_loader.swf
+- $(LN_S) $(pkgdatadir)/swfs/tessel_loader.swf $(pkgdatadir)/swfs/default_loader.swf
++ $(mkinstalldirs) $(DESTDIR)/$(pkgdatadir)
++ $(mkinstalldirs) $(DESTDIR)/$(pkgdatadir)/swfs
++ $(INSTALL_DATA) ./simple_viewer.swf $(DESTDIR)/$(pkgdatadir)/swfs/simple_viewer.swf
++ $(INSTALL_DATA) ./keyboard_viewer.swf
$(DESTDIR)/$(pkgdatadir)/swfs/keyboard_viewer.swf
++ $(INSTALL_DATA) ./PreLoaderTemplate.swf
$(DESTDIR)/$(pkgdatadir)/swfs/PreLoaderTemplate.swf
++ $(INSTALL_DATA) ./tessel_loader.swf $(DESTDIR)/$(pkgdatadir)/swfs/tessel_loader.swf
++ $(INSTALL_DATA) ./swft_loader.swf $(DESTDIR)/$(pkgdatadir)/swfs/swft_loader.swf
+ $(LN_S) simple_viewer.swf $(DESTDIR)/$(pkgdatadir)/swfs/default_viewer.swf
+ $(LN_S) tessel_loader.swf $(DESTDIR)/$(pkgdatadir)/swfs/default_loader.swf
uninstall:
- $(UNINSTALL_DATA) $(DESTDIR)/$(pkgdatadir)/swfs/simple_viewer.swf
+- $(UNINSTALL_DATA) $(pkgdatadir)/swfs/simple_viewer.swf
+- $(UNINSTALL_DATA) $(pkgdatadir)/swfs/keyboard_viewer.swf
+- $(UNINSTALL_DATA) $(pkgdatadir)/swfs/PreLoaderTemplate.swf
+- $(UNINSTALL_DATA) $(pkgdatadir)/swfs/tessel_loader.swf
+- $(UNINSTALL_DATA) $(pkgdatadir)/swfs/swft_loader.swf
+- $(UNINSTALL_DATA) $(pkgdatadir)/swfs/default_viewer.swf
+- $(UNINSTALL_DATA) $(pkgdatadir)/swfs/default_loader.swf
++ $(UNINSTALL_DATA) $(DESTDIR)/$(pkgdatadir)/swfs/simple_viewer.swf
++ $(UNINSTALL_DATA) $(DESTDIR)/$(pkgdatadir)/swfs/keyboard_viewer.swf
++ $(UNINSTALL_DATA) $(DESTDIR)/$(pkgdatadir)/swfs/PreLoaderTemplate.swf
++ $(UNINSTALL_DATA) $(DESTDIR)/$(pkgdatadir)/swfs/tessel_loader.swf
++ $(UNINSTALL_DATA) $(DESTDIR)/$(pkgdatadir)/swfs/swft_loader.swf
++ $(UNINSTALL_DATA) $(DESTDIR)/$(pkgdatadir)/swfs/default_viewer.swf
++ $(UNINSTALL_DATA) $(DESTDIR)/$(pkgdatadir)/swfs/default_loader.swf
+
+ clean:
+ rm -f *.o *.obj *.lo *.a *.lib *.la gmon.out
diff --git a/swftools.spec b/swftools.spec
index cad89fc..5e3d686 100644
--- a/swftools.spec
+++ b/swftools.spec
@@ -1,12 +1,6 @@
-# Filter Python modules from Provides
-%{?filter_setup:
-%filter_provides_in %{python_sitearch}/.*\.so$
-%filter_setup
-}
-
Name: swftools
Version: 0.9.2
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: SWF manipulation and generation utilities
Group: Applications/Multimedia
@@ -15,16 +9,15 @@ Group: Applications/Multimedia
License: GPLv3+ and LGPLv2+ and BSD
URL:
http://www.swftools.org/
Source0:
http://www.swftools.org/%{name}-%{version}.tar.gz
-# Add prefix to installation paths
-Patch0: swftools-0.9.2-prefix.patch
# Fix installation
-Patch1: swftools-0.9.2-install.patch
+Patch0: swftools-0.9.2-install.patch
BuildRequires: fftw-devel
BuildRequires: fontconfig-devel
BuildRequires: giflib-devel
BuildRequires: lame-devel
-BuildRequires: python-imaging-devel
+BuildRequires: python2-devel
+BuildRequires: python2-pillow-devel
BuildRequires: zziplib-devel
%description
@@ -34,19 +27,18 @@ them, and creating them from other content (like images, sound files,
videos or
source code).
-%package -n python-%{name}
+%package -n python2-%{name}
Summary: Python bindings for %{name}
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
+%{?python_provide:%python_provide python2-%{name}}
-%description -n python-%{name}
+%description -n python2-%{name}
This package provides Python bindings for %{name}.
%prep
-%setup -q
-%patch0 -p1 -b .prefix
-%patch1 -p1 -b .install
+%autosetup -p0
# Fix permissions
chmod -x lib/*.[ch] lib/action/*.[ch]
@@ -60,8 +52,8 @@ done
%build
-export PYTHON_INCLUDES=$(python-config --includes)/Imaging/
-export PYTHON_LIB=$(python-config --libs)
+export PYTHON_INCLUDES=$(python2-config --includes)/Imaging/
+export PYTHON_LIB=$(python2-config --libs)
export PYTHON_LIB2=$PYTHON_LIB
export HAVE_PYTHON_IMAGING_LIB=1
%configure
@@ -71,22 +63,27 @@ make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
-install -dm 0755 $RPM_BUILD_ROOT%{python_sitearch}/
-install -Dp lib/python/*.so $RPM_BUILD_ROOT%{python_sitearch}/
+install -dm 0755 $RPM_BUILD_ROOT%{python2_sitearch}/
+install -Dp lib/python/*.so $RPM_BUILD_ROOT%{python2_sitearch}/
%files
-%doc AUTHORS ChangeLog COPYING doc/fileformat.sc
+%doc AUTHORS ChangeLog doc/fileformat.sc
+%license COPYING
%{_bindir}/*
%{_mandir}/man1/*.1.*
%{_datadir}/%{name}/
-%files -n python-%{name}
+%files -n python2-%{name}
%{python_sitearch}/*.so
%changelog
+* Fri Feb 23 2018 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.2-7
+- Spec cleanup
+- Update for latest Python guidelines
+
* Thu Aug 31 2017 RPM Fusion Release Engineering <kwizart(a)rpmfusion.org> - 0.9.2-6
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
@@ -94,8 +91,7 @@ install -Dp lib/python/*.so $RPM_BUILD_ROOT%{python_sitearch}/
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Aug 01 2016 Sérgio Basto <sergio(a)serjux.com> - 0.9.2-4
--
-
https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_...
+-
https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_...
* Sun Aug 31 2014 Sérgio Basto <sergio(a)serjux.com> - 0.9.2-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
@@ -115,7 +111,7 @@ install -Dp lib/python/*.so $RPM_BUILD_ROOT%{python_sitearch}/
* Wed Nov 30 2011 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.1-4
- Spec cleanup
-* Thu Jan 10 2011 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.1-3
+* Mon Jan 10 2011 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.1-3
- Remove pdflib-devel from BuildRequires
* Thu Nov 11 2010 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 0.9.1-2
@@ -126,5 +122,5 @@ install -Dp lib/python/*.so $RPM_BUILD_ROOT%{python_sitearch}/
- Update to 0.9.1
- Disable Python modules build (broken in 0.9.1)
-* Wed Jun 3 2010 Mohamed El Morabity <melmorabity(a)fedoraproject.org> 0.9.0-1
+* Thu Jun 3 2010 Mohamed El Morabity <melmorabity(a)fedoraproject.org> 0.9.0-1
- Initial RPM release