Hello community, here is the log from the commit of package pdftk for openSUSE:Factory checked in at Mon Mar 21 15:37:55 CET 2011. -------- --- pdftk/pdftk.changes 2011-03-08 17:13:35.000000000 +0100 +++ /mounts/work_src_done/STABLE/pdftk/pdftk.changes 2011-03-17 23:44:38.000000000 +0100 @@ -1,0 +2,17 @@ +Thu Mar 17 22:17:27 UTC 2011 - brian@aljex.com + +- created new spec and makefile that builds on a wide range of SUSE versions (at least 10.0 to current) +- use the native/highest version of gcc/gcj on each version of SUSE, not forcing gcj41 +- removed unnecessary dos2unix +- use rpm macros where possible +- created Makefile.SUSE + allow for inconsistent names of executables and libgcj.jar + allow rpm to supply %%optflags + remove unrecognized -Wextra + fastjar has no suffix on any version of SUSE + un-hardcode "/usr/share/java", get from rpm macro(s) instead. + allow using "make -f Makefile.SUSE VERSUFF=-4.5", so Makefile.SUSE + can also be used manually following the same directions found in the source + for the other makefiles. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- pdftk-1.44.tar.bz2 pdftk-fastjar_no_versuff.patch New: ---- Makefile.SUSE pdftk-1.44-src.zip ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pdftk.spec ++++++ --- /var/tmp/diff_new_pack.3iQLJr/_old 2011-03-21 15:32:28.000000000 +0100 +++ /var/tmp/diff_new_pack.3iQLJr/_new 2011-03-21 15:32:28.000000000 +0100 @@ -19,29 +19,63 @@ Name: pdftk Version: 1.44 -Release: 1 +Release: 2 License: GPLv2+ Summary: A handy tool for manipulating PDF Url: http://www.pdflabs.com/ Group: Productivity/Publishing/PDF -Source0: pdftk-%{version}.tar.bz2 -Patch0: pdftk-fastjar_no_versuff.patch -Patch1: bug-427046_pdftk.cc.patch +Source0: %{name}-%{version}-src.zip +Source1: Makefile.SUSE +Patch0: bug-427046_pdftk.cc.patch +AutoReqProv: on +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: unzip + +# BuildRequires package version suffix : "41" for "gcc41-java" +%define pkgv %nil +# gcc/gcj binaries version suffix : "-4.1" for "gcj-4.1" +%define gxxv %nil +# ligcj.jar version suffix : "-4.1" for "/usr/share/java/libgcj-4.1.jar" +%define jarv %nil + %if 0%{?suse_version} >= 1130 -BuildRequires: gcc45 -BuildRequires: gcc45-c++ -BuildRequires: gcc45-java -BuildRequires: libstdc++45-devel -%else -BuildRequires: gcc41 -BuildRequires: gcc41-c++ -BuildRequires: gcc41-java -BuildRequires: libstdc++41-devel +%define jarv -4.5 +%endif + +%if 0%{?suse_version} <= 1120 +%define jarv -4.4 +%endif + +%if 0%{?suse_version} <= 1110 +%define jarv -4.3 +%endif + +# openSUSE 11.0 and SLE_11 are odd cases. +# %jarv is still correct from above for both +%if 0%{?suse_version} == 1100 || 0%{?sles_version} == 11 +# "Nothing provides libgcj" +%define pkgv 43 +# "gcj command not found", "gcjh command not found" +%define gxxv -4.3 +%endif + +%if 0%{?suse_version} == 1020 +%define jarv -4.1.2 %endif -BuildRequires: dos2unix + +%if 0%{?suse_version} == 1010 +%define jarv -4.1.0 +%endif + +%if 0%{?suse_version} == 1000 +%define jarv -4.0.2 +%endif + +BuildRequires: gcc%{pkgv}-c++ gcc%{pkgv}-java libgcj%{pkgv} libgcj%{pkgv}-devel + +%if 0%{?suse_version} > 1010 || 0%{?sles_version} == 10 BuildRequires: fastjar -BuildRequires: unzip -BuildRoot: %{_tmppath}/%{name}-%{version}-build +%endif %description If PDF is electronic paper, then pdftk is an electronic staple-remover, @@ -66,34 +100,26 @@ * Repair Corrupted PDF (Where Possible) %prep -%setup -q -%patch0 -%patch1 -p1 +%setup -q -n %{name}-%{version}-dist +%patch0 -p1 +%__cp %{S:1} pdftk/Makefile +%__sed -i 's/\r$//' changelog.txt license_gpl_pdftk/*.txt license_gpl_pdftk/*/*.txt %build -%{suse_update_config -fl} -%if 0%{?suse_version} >= 1130 -VERSUFF=-4.5 -%else -VERSUFF=-4.1 -%endif -unset CLASSPATH && cd pdftk && make -f Makefile.Redhat VERSUFF=$VERSUFF && cd - -dos2unix -f changelog.txt pdftk.1.txt license_gpl_pdftk/*.txt +%__make -C pdftk CXXFLAGS="%optflags" LIBGCJ=%{_javadir}/libgcj%{jarv}.jar GXXV=%gxxv +%__strip pdftk/%name %install -mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{_mandir}/man1 -install -m 0755 pdftk/pdftk %{buildroot}%{_bindir}/pdftk -install -m 0644 pdftk.1 %{buildroot}%{_mandir}/man1/pdftk.1 -gzip %{buildroot}%{_mandir}/man1/pdftk.1 +%__install -Dm 0755 pdftk/%name %{buildroot}%{_bindir}/%name +%__install -Dpm 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %clean -rm -rf %{buildroot} +%__rm -rf %buildroot %files %defattr(-,root,root) -%{_bindir}/* -%{_mandir}/man1/* -%doc changelog.txt pdftk.1.html pdftk.1.txt license_gpl_pdftk/*.txt +%{_bindir}/%name +%{_mandir}/man1/%{name}.* +%doc changelog.txt license_gpl_pdftk/*.txt license_gpl_pdftk/*/*.txt %changelog ++++++ Makefile.SUSE ++++++ # -*- Mode: Makefile -*- # Makefile.SUSE # Makefile for pdftk 1.44 on SUSE # brian@aljex.com # fastjar never has a suffix # libgcj suffix sometimes does not match g* binaries suffix # g* binaries sometimes must not have any suffix # un-hardcode /usr/share/java, see %_javadir in /usr/lib/rpm/macros # remove unrecognized "-Wextra" from *FLAGS # allow rpm to set CXXFLAGS from %optflags or %configure # allow GJAR to be overridden, ex: gjar-4.5 instead of fastjar etc # Backwards compatibility with generic pdftk build directions. # .spec file does not use VERSUFF, and it's not technically correct # for the older versions, although it works anyways. # It works on the new versions because the suffix in libgcj*.jar # and on g++/gcj/gcjh is the same. # It works on the old versions only because they happen to use gcjh 4.1 # or lower, which does not need libgcj*.jar in --classpath, and so you # can just set VERSUFF to match the executables (empty in all those cases), # and ignore the fact that this will set LIBGCJ wrong. # This allows the Makefile to be included in the upstream pdftk source, # and the generic manual build instructions should work for most versions of openSUSE. # The .spec however sets GXXV, JARV, _JAVADIR, and/or LIBGCJ explicitly as needed. # Here are the correct values to use for several versions of openSUSE: # 10.0 : make -f Makefile.SUSE # 10.1 : make -f Makefile.SUSE # 10.2 : make -f Makefile.SUSE # 10.3 : make -f Makefile.SUSE VERSUFF=-4.3 # 11.0 : make -f Makefile.SUSE VERSUFF=-4.3 # 11.1 : make -f Makefile.SUSE VERSUFF=-4.3 # 11.2 : make -f Makefile.SUSE VERSUFF=-4.4 # 11.3 : make -f Makefile.SUSE VERSUFF=-4.5 # 11.4 : make -f Makefile.SUSE VERSUFF=-4.5 ifdef VERSUFF GXXV := $(VERSUFF) export JARV := $(VERSUFF) endif export CXX := g++$(GXXV) export GCJ := gcj$(GXXV) export GCJH := gcjh$(GXXV) export GJAR ?= fastjar export AR = ar export RM = rm export ARFLAGS = rs export RMFLAGS = -vf # Allow .spec to supply "/usr/share/java" from rpm macro. # ( %_javadir = %{_datadir}/java ;%_datadir = %{_prefix}/share ;%_prefix = /usr ) export _JAVADIR ?= /usr/share/java # Allow .spec to supply entire path/filename for libgcj.jar export LIBGCJ ?= $(_JAVADIR)/libgcj$(JARV).jar # Allow .spec to supply CXXFLAGS from rpm macro (%optflags or %configure) export CXXFLAGS ?= -Wall -O2 export GCJFLAGS ?= -Wall -O2 export CPPFLAGS = -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers export GCJHFLAGS = -force export LDLIBS = -lgcj include Makefile.Base ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org