From cc067b8e44ab8c234f9a94a0b65159514571f0f5 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 30 Jul 2017 22:24:50 +0200 Subject: [PATCH] - updated to 0.99 - removed obsolete DESTDIR patch - added info patch (add direntry to texinfo file) - added lib patch (restore installing library, now shared one) --- barcode-DESTDIR.patch | 58 --------------------- barcode-info.patch | 13 +++++ barcode-lib.patch | 115 ++++++++++++++++++++++++++++++++++++++++++ barcode.spec | 69 ++++++++++++++++++------- 4 files changed, 178 insertions(+), 77 deletions(-) delete mode 100644 barcode-DESTDIR.patch create mode 100644 barcode-info.patch create mode 100644 barcode-lib.patch diff --git a/barcode-DESTDIR.patch b/barcode-DESTDIR.patch deleted file mode 100644 index 62d4457..0000000 --- a/barcode-DESTDIR.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- barcode-0.98/Makefile.in~ Tue Aug 6 05:07:39 2002 -+++ barcode-0.98/Makefile.in Tue Aug 6 05:07:39 2002 -@@ -11,12 +11,11 @@ - LDFLAGS = -L. -l$(TARGET) @LIBPAPER@ - - prefix = @prefix@ --BINDIR = $(prefix)/bin --LIBDIR = $(prefix)/lib --INCDIR = $(prefix)/include --MAN1DIR = $(prefix)/man/man1 --MAN3DIR = $(prefix)/man/man3 --INFODIR = $(prefix)/info -+bindir = @bindir@ -+libdir = @libdir@ -+includedir = @includedir@ -+mandir = @mandir@ -+infodir = @infodir@ - - # getopt may be installed or not, if not take our copy - GETOPT_O = @GETOPT_O@ -@@ -63,22 +62,23 @@ - cd doc && $(MAKE) - - install: -- $(INSTALL) -d $(BINDIR) $(INCDIR) $(LIBDIR) $(MAN1DIR) \ -- $(MAN3DIR) $(INFODIR) -- $(INSTALL) -c $(TARGET) $(BINDIR) -- $(INSTALL) -c -m 0644 $(HEADER) $(INCDIR) -- $(INSTALL) -c -m 0644 $(LIBRARY) $(LIBDIR) -- $(INSTALL) -c -m 0644 $(MAN1) $(MAN1DIR) -- $(INSTALL) -c -m 0644 $(MAN3) $(MAN3DIR) -- $(INSTALL) -c -m 0644 $(INFO) $(INFODIR) -+ $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir) \ -+ $(DESTDIR)$(libdir) $(DESTDIR)$(mandir)/man1 \ -+ $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(infodir) -+ $(INSTALL) -c $(TARGET) $(DESTDIR)$(bindir) -+ $(INSTALL) -c -m 0644 $(HEADER) $(DESTDIR)$(includedir) -+ $(INSTALL) -c -m 0644 $(LIBRARY) $(DESTDIR)$(libdir) -+ $(INSTALL) -c -m 0644 $(MAN1) $(DESTDIR)$(mandir)/man1 -+ $(INSTALL) -c -m 0644 $(MAN3) $(DESTDIR)$(mandir)/man3 -+ $(INSTALL) -c -m 0644 $(INFO) $(DESTDIR)$(infodir) - - uninstall: -- $(RM) -f $(BINDIR)/$(TARGET) -- $(RM) -f $(INCDIR)/$(HEADER) -- $(RM) -f $(LIBDIR)/$(LIBRARY) -- $(RM) -f $(MAN1DIR)/$(MAN1) -- $(RM) -f $(MAN3DIR)/$(MAN3) -- $(RM) -f $(INDODIR)/$(INFO) -+ $(RM) -f $(DESTDIR)$(bindir)/$(TARGET) -+ $(RM) -f $(DESTDIR)$(includedir)/$(HEADER) -+ $(RM) -f $(DESTDIR)$(libdir)/$(LIBRARY) -+ $(RM) -f $(DESTDIR)$(mandir)/man1/$(MAN1) -+ $(RM) -f $(DESTDIR)$(mandir)/$(MAN3) -+ $(RM) -f $(DESTDIR)$(INDODIR)/$(INFO) - - #Make clean keeps the compiled documents - clean: diff --git a/barcode-info.patch b/barcode-info.patch new file mode 100644 index 0000000..4a8c739 --- /dev/null +++ b/barcode-info.patch @@ -0,0 +1,13 @@ +--- barcode-0.99/doc/barcode.texi.orig 2013-03-29 22:51:08.000000000 +0100 ++++ barcode-0.99/doc/barcode.texi 2017-07-30 18:09:34.589683489 +0200 +@@ -31,6 +31,10 @@ + @finalout + + @ifinfo ++@dircategory Miscellaneous: ++@direntry ++* Barcode (barcode). Barcode tools ++@end direntry + + This file is the User's Manual for the barcode library (version + @value{version}). diff --git a/barcode-lib.patch b/barcode-lib.patch new file mode 100644 index 0000000..e5a6560 --- /dev/null +++ b/barcode-lib.patch @@ -0,0 +1,115 @@ +--- barcode-0.99/Makefile.am.orig 2013-03-29 22:51:07.000000000 +0100 ++++ barcode-0.99/Makefile.am 2017-07-30 18:34:30.092999746 +0200 +@@ -21,11 +21,13 @@ + + AM_LDFLAGS = -L. @LIBPAPER@ + +-EXTRA_DIST = barcode.h cmdline.h ++EXTRA_DIST = cmdline.h ++include_HEADERS = barcode.h + +-bin_PROGRAMS = barcode sample ++bin_PROGRAMS = barcode ++noinst_PROGRAMS = sample + +-noinst_LTLIBRARIES = libbarcode.la ++lib_LTLIBRARIES = libbarcode.la + + ACLOCAL_AMFLAGS = -I m4 + +--- barcode-0.99/barcode_priv.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ barcode-0.99/barcode_priv.h 2017-07-30 18:54:10.829652931 +0200 +@@ -0,0 +1,12 @@ ++#ifndef _BARCODE_PRIV_H_ ++#define _BARCODE_PRIV_H_ ++ ++#include "config.h" ++#include "barcode.h" ++ ++#include ++ ++#define _(X) gettext (X) ++#define _N(X) (X) ++ ++#endif +--- barcode-0.99/barcode.h.orig 2013-03-29 22:51:07.000000000 +0100 ++++ barcode-0.99/barcode.h 2017-07-30 18:54:10.812986267 +0200 +@@ -23,13 +23,10 @@ + #ifndef _BARCODE_H_ + #define _BARCODE_H_ + +-#include "config.h" + #include + +-#include +- +-#define _(X) gettext (X) +-#define _N(X) (X) ++#define BARCODE_VERSION "0.99" ++#define BARCODE_VERSION_INT 9900 + + /* + * The object +--- barcode-0.99/library.c.orig 2013-03-29 23:23:18.000000000 +0100 ++++ barcode-0.99/library.c 2017-07-30 18:54:37.596319295 +0200 +@@ -19,7 +19,7 @@ + * along with this program. If not, see . + */ + +-#include "barcode.h" ++#include "barcode_priv.h" + + #include + #include +--- barcode-0.99/main.c.orig 2013-03-29 23:22:24.000000000 +0100 ++++ barcode-0.99/main.c 2017-07-30 19:05:37.969645087 +0200 +@@ -20,7 +20,7 @@ + * along with this program. If not, see . + */ + +-#include "barcode.h" ++#include "barcode_priv.h" + #include + #include + #include +--- barcode-0.99/pcl.c.orig 2013-03-29 23:23:31.000000000 +0100 ++++ barcode-0.99/pcl.c 2017-07-30 19:37:17.896290059 +0200 +@@ -19,7 +19,7 @@ + * along with this program. If not, see . + */ + +-#include "barcode.h" ++#include "barcode_priv.h" + + #include + #include +--- barcode-0.99/plessey.c.orig 2017-07-30 19:29:55.792961773 +0200 ++++ barcode-0.99/plessey.c 2017-07-30 19:37:32.916289887 +0200 +@@ -17,7 +17,7 @@ + * along with this program. If not, see . + */ + +-#include "barcode.h" ++#include "barcode_priv.h" + + #include + #include +--- barcode-0.99/cmdline.c.orig 2013-03-29 23:22:31.000000000 +0100 ++++ barcode-0.99/cmdline.c 2017-07-30 19:39:21.519621980 +0200 +@@ -22,7 +22,7 @@ + * Michele Comitini (mcm@glisco.it): better handling of numeric type args. + */ + +-#include "barcode.h" ++#include "barcode_priv.h" + #include + #include + #include +--- barcode-0.99/sample.c.orig 2013-03-29 23:23:50.000000000 +0100 ++++ barcode-0.99/sample.c 2017-07-30 20:36:21.412916266 +0200 +@@ -1,4 +1,4 @@ +-#include "barcode.h" ++#include "barcode_priv.h" + + #include + #include diff --git a/barcode.spec b/barcode.spec index 436a225..4702cd3 100644 --- a/barcode.spec +++ b/barcode.spec @@ -1,17 +1,24 @@ Summary: GNU barcode Summary(pl.UTF-8): GNU barcode - narzędzie do kodów paskowych Name: barcode -Version: 0.98 -Release: 5 -License: GPL +Version: 0.99 +Release: 1 +License: GPL v3+ Group: Applications/Graphics -Source0: http://ftp.gnu.org/gnu/barcode/%{name}-%{version}.tar.gz -# Source0-md5: 7f10c3307b84a19a4ab2fa4b3f2974da -Patch0: %{name}-DESTDIR.patch -Patch1: format-security.patch +Source0: http://ftp.gnu.org/gnu/barcode/%{name}-%{version}.tar.xz +# Source0-md5: cdc504ee1020e27fbfeebcb0718de054 +Patch0: format-security.patch +Patch1: %{name}-info.patch +Patch2: %{name}-lib.patch URL: http://www.gnu.org/software/barcode/ -BuildRequires: autoconf -BuildRequires: automake +BuildRequires: autoconf >= 2.65 +BuildRequires: automake >= 1.5 +BuildRequires: gettext-tools >= 0.18 +BuildRequires: libpaper-devel +BuildRequires: libtool >= 2:2 +BuildRequires: tar >= 1:1.22 +BuildRequires: texinfo +BuildRequires: xz Conflicts: xscreensaver <= 1:4.16-2 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -35,6 +42,7 @@ potrzeby mogą być dodane inne backendy). Summary: GNU barcode files for development Summary(pl.UTF-8): Pliki do programowania z użyciem GNU barcode Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel This is GNU-barcode. The package is meant to solve most needs in @@ -44,8 +52,8 @@ EAN-8, ISBN, as well as a few other formats. Ouput is generated as either Postscript or Encapsulated Postscript (other back-ends may be added if needed). -This subpackage contains the C header, the static library and man page -for developing programs that use GNU barcode. +This subpackage contains the C header file for developing programs +that use GNU barcode. %description devel -l pl.UTF-8 To jest GNU-barcode. Ten pakiet ma za zadanie zaspokoić większość @@ -55,17 +63,33 @@ EAN-13, EAN-8, ISBN, a także kilku innych. Dane wyjściowe są generowane w formacie Postscript lub Encapsulated Postscript (w razie potrzeby mogą być dodane inne backendy). -Ten podpakiet zawiera plik nagłówkowy do C, statyczną bibliotekę oraz -stronę manuala do tworzenia programów używających GNU barcode. +Ten podpakiet zawiera plik nagłówkowy języka C do tworzenia programów +używających GNU barcode. + +%package static +Summary: GNU barcode static library +Summary(pl.UTF-8): Biblioteka statyczna GNU barcode +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +GNU barcode static library. + +%description static -l pl.UTF-8 +Biblioteka statyczna GNU barcode. %prep %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build -%{__aclocal} +%{__libtoolize} +%{__aclocal} -I m4 %{__autoconf} +%{__autoheader} +%{__automake} %configure %{__make} @@ -78,21 +102,28 @@ rm -rf $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT -%post -p /sbin/postshell +%post -p /sbin/postshell +/sbin/ldconfig -/usr/sbin/fix-info-dir -c %{_infodir} -%postun -p /sbin/postshell +%postun -p /sbin/postshell +/sbin/ldconfig -/usr/sbin/fix-info-dir -c %{_infodir} %files %defattr(644,root,root,755) -%doc ChangeLog README TODO +%doc ChangeLog NEWS README TODO %attr(755,root,root) %{_bindir}/barcode +%attr(755,root,root) %{_libdir}/libbarcode.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libbarcode.so.0 %{_infodir}/barcode.info* -%{_mandir}/man1/barcode.1* %files devel %defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libbarcode.so +%{_libdir}/libbarcode.la %{_includedir}/barcode.h + +%files static +%defattr(644,root,root,755) %{_libdir}/libbarcode.a -%{_mandir}/man3/barcode.3* -- 2.43.0