commit 0aa56887699180825c2114cecb6fcf0ab580e67737eb98ce9bbd0f6feda45290 Author: Ismail Dönmez Date: Wed Sep 21 12:28:46 2016 +0000 Accepting request 429183 from home:pluskalm:branches:home:vcuadradojuan new package, please add me as maintainer OBS-URL: https://build.opensuse.org/request/show/429183 OBS-URL: https://build.opensuse.org/package/show/graphics/pagetools?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/01-makefile-clean-fix.patch b/01-makefile-clean-fix.patch new file mode 100644 index 0000000..9f0a1f0 --- /dev/null +++ b/01-makefile-clean-fix.patch @@ -0,0 +1,15 @@ +Description: Fix of make clean target, as it leaves .d files inside directories +Author: Víctor Cuadrado Juan +Upstream: dead + +--- Makefile ++++ Makefile +@@ -44,7 +44,7 @@ + + + clean: +- rm -rf */*.o core *.d $(PTLIB) pbm_findskew/pbm_findskew tiff_findskew/tiff_findskew ++ rm -rf */*.o core *.d */*.d $(PTLIB) pbm_findskew/pbm_findskew tiff_findskew/tiff_findskew + + -include *.d + diff --git a/02-makefile-ldflags-add.patch b/02-makefile-ldflags-add.patch new file mode 100644 index 0000000..d05e550 --- /dev/null +++ b/02-makefile-ldflags-add.patch @@ -0,0 +1,19 @@ +Description: Add LDFLAGS to linking phase so we can use them on dh rules +Author: Víctor Cuadrado Juan +Upstream: dead + +--- Makefile ++++ Makefile +@@ -37,10 +37,10 @@ + + + pbm_findskew/pbm_findskew: pbm_findskew/pbm_findskew.o $(PTLIB) +- $(C++) pbm_findskew/pbm_findskew.o $(PTLIB) -l$(LIBPBM) -o $@ ++ $(C++) pbm_findskew/pbm_findskew.o $(PTLIB) -l$(LIBPBM) -o $@ $(LDFLAGS) + + tiff_findskew/tiff_findskew: tiff_findskew/tiff_findskew.o $(PTLIB) +- $(C++) tiff_findskew/tiff_findskew.o $(PTLIB) -ltiff -o $@ ++ $(C++) tiff_findskew/tiff_findskew.o $(PTLIB) -ltiff -o $@ $(LDFLAGS) + + + clean: diff --git a/03-pbmfact.patch b/03-pbmfact.patch new file mode 100644 index 0000000..179545a --- /dev/null +++ b/03-pbmfact.patch @@ -0,0 +1,15 @@ +Description: Hardcode the include for netpbm lib since -l doesn't work on opensuse +Author: Víctor Cuadrado Juan +Upstream: dead + +--- formats/pbmfact.cpp ++++ formats/pbmfact.cpp +@@ -19,7 +19,7 @@ + #include + + extern "C"{ +-#include ++#include + } + + namespace pagetools{ diff --git a/pagetools-0.1.tar.gz b/pagetools-0.1.tar.gz new file mode 100644 index 0000000..1049a8a --- /dev/null +++ b/pagetools-0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa4532deb4d288271d0c0d389dfcd868f4af7d1a4fde470d43d263facabca5ba +size 14115 diff --git a/pagetools.spec b/pagetools.spec new file mode 100644 index 0000000..0e0f1e4 --- /dev/null +++ b/pagetools.spec @@ -0,0 +1,65 @@ +# +# spec file for package pagetools +# +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 Víctor Cuadrado Juan +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: pagetools +Version: 0.1 +Release: 0 +Summary: Automatic de-skew and bounding box determination for scanned page images +License: GPL-2.0+ +Group: Productivity/Graphics/Convertors +Url: http://sourceforge.net/projects/pagetools +Source0: http://sf.net/pagetools/pagetools-%{version}.tar.gz +Patch0: 01-makefile-clean-fix.patch +Patch1: 02-makefile-ldflags-add.patch +Patch2: 03-pbmfact.patch +BuildRequires: gcc-c++ +BuildRequires: libnetpbm-devel +BuildRequires: pkgconfig(libtiff-4) + +%description +This program determines the skew angle for text, and works with black/white +images in TIFF or PBM format. To achieve this, it uses an original algorithm +based on a fast implementation of the Radon transform. This program is part of +the Page Layout Detection Tools project, which aims to automate the layout +detection in scanned page images. + +%prep +%setup -q -c +%patch0 +%patch1 +%patch2 + +%build +make %{?_smp_mflags} C++_FLAGS="%{optflags}" + +%install +install -D -p -m 0755 pbm_findskew/pbm_findskew %{buildroot}%{_bindir}/pbm_findskew +install -D -p -m 0755 tiff_findskew/tiff_findskew %{buildroot}%{_bindir}/tiff_findskew +install -D -p -m 0644 pbm_findskew/pbm_findskew.1 %{buildroot}%{_mandir}/man1/pbm_findskew.1 +install -D -p -m 0644 tiff_findskew/tiff_findskew.1 %{buildroot}%{_mandir}/man1/tiff_findskew.1 + +%files +%defattr(-,root,root,-) +%doc COPYING README.txt TODO +%{_bindir}/pbm_findskew +%{_bindir}/tiff_findskew +%{_mandir}/man1/pbm_findskew.1%{ext_man} +%{_mandir}/man1/tiff_findskew.1%{ext_man} + +%changelog