commit 09aba6489ad7e453bdc0ae5662e8b87b2883c3e6737e65ceb475ce4c11807a2e Author: Pavol Rusnak Date: Thu Apr 21 14:12:21 2011 +0000 Accepting request 67639 from home:gberh OBS-URL: https://build.opensuse.org/request/show/67639 OBS-URL: https://build.opensuse.org/package/show/Publishing/bibtool?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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/BibTool-2.51.tar.bz2 b/BibTool-2.51.tar.bz2 new file mode 100644 index 0000000..8e535fe --- /dev/null +++ b/BibTool-2.51.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:869b55eb5cb3a48709282367be7fca3c288e97c8d1ec2987ed2ecc34c575cfc3 +size 521196 diff --git a/bibtool-fix-libkpathsea-detection.patch b/bibtool-fix-libkpathsea-detection.patch new file mode 100644 index 0000000..da15691 --- /dev/null +++ b/bibtool-fix-libkpathsea-detection.patch @@ -0,0 +1,14 @@ +diff -ur BibTool.orig/configure.in BibTool/configure.in +--- BibTool.orig/configure.in 2010-02-27 12:40:16.000000000 +0100 ++++ BibTool/configure.in 2011-04-16 13:39:01.521999963 +0200 +@@ -78,6 +78,10 @@ + kpathsea_dir=$cand + kpathsea_def="-DHAVE_LIBKPATHSEA -I$cand" + kpathsea_lib=$cand/../lib/libkpathsea.a ++ elif test -f ${libdir}/libkpathsea.a; then ++ kpathsea_dir=$cand ++ kpathsea_def="-DHAVE_LIBKPATHSEA -I$cand" ++ kpathsea_lib=${libdir}/libkpathsea.a + else + if test -f $cand/kpathsea/STATIC/libkpathsea.a; then + kpathsea_lib=$cand/kpathsea/STATIC/libkpathsea.a diff --git a/bibtool-honor-cflags.patch b/bibtool-honor-cflags.patch new file mode 100644 index 0000000..5c57cdb --- /dev/null +++ b/bibtool-honor-cflags.patch @@ -0,0 +1,12 @@ +diff -urNp BibTool.orig/AutoConf/makefile.in BibTool/AutoConf/makefile.in +--- BibTool.orig/AutoConf/makefile.in 2010-04-02 17:47:35.000000000 +0200 ++++ BibTool/AutoConf/makefile.in 2011-04-04 18:43:55.000000000 +0200 +@@ -86,7 +86,7 @@ CC = @CC@ + # optimizer is turned on. + # + +-CFLAGS = ++CFLAGS = @CFLAGS@ + # CFLAGS = -O + # GNU C + # CFLAGS = -g -Wall diff --git a/bibtool-use-system-regex.patch b/bibtool-use-system-regex.patch new file mode 100644 index 0000000..0a7bdd8 --- /dev/null +++ b/bibtool-use-system-regex.patch @@ -0,0 +1,48 @@ +diff -urNp BibTool.orig/AutoConf/makefile.in BibTool/AutoConf/makefile.in +--- BibTool.orig/AutoConf/makefile.in 2011-04-04 18:43:55.000000000 +0200 ++++ BibTool/AutoConf/makefile.in 2011-04-04 18:57:14.000000000 +0200 +@@ -220,9 +220,9 @@ NON_ANSI_DEFS = @DEFS@ + REGEX_DIR = regex-0.12 + # + +-REGEX_DEF = -DREGEX -I$(REGEX_DIR) -I.. ++REGEX_DEF = -DREGEX + +-REGEX = regex$(OBJ) ++REGEX = + + # ------------------------------------------------------- + # Kpathsea Library support. +@@ -473,8 +473,8 @@ $(OFILES): $(MAKEFILE) + # __________________________________________________________________ + # Targets from the GNU Regular Expression Library. + +-regex$(OBJ): $(REGEX_DIR)$(DIR_SEP)regex.c $(MAKEFILE) +- $(CC) $(C_FLAGS) -I$(REGEX_DIR) -I.. $(NON_ANSI_DEFS) $(REGEX_DIR)$(DIR_SEP)regex.c $(DONT_LINK) -o $@ ++#regex$(OBJ): $(REGEX_DIR)$(DIR_SEP)regex.c $(MAKEFILE) ++# $(CC) $(C_FLAGS) -I$(REGEX_DIR) -I.. $(NON_ANSI_DEFS) $(REGEX_DIR)$(DIR_SEP)regex.c $(DONT_LINK) -o $@ + + + bibtcl: +@@ -503,7 +503,7 @@ test check: + (cd Test; $(MAKE)) + + libbib.a: $(OLIBFILES) +- $(AR) $@ $(OLIBFILES) regex.o ++ $(AR) $@ $(OLIBFILES) + $(RANLIB) $@ + + depend: +diff -urNp BibTool.orig/rewrite.c BibTool/rewrite.c +--- BibTool.orig/rewrite.c 2010-02-27 12:40:16.000000000 +0100 ++++ BibTool/rewrite.c 2011-04-04 19:08:00.000000000 +0200 +@@ -24,7 +24,8 @@ + #include + + #ifdef REGEX +-#include ++#define __USE_GNU ++#include + #endif + + typedef struct rULE diff --git a/bibtool.changes b/bibtool.changes new file mode 100644 index 0000000..2e8d9ac --- /dev/null +++ b/bibtool.changes @@ -0,0 +1,11 @@ +------------------------------------------------------------------- +Sat Apr 16 11:53:45 UTC 2011 - gber@opensuse.org + +- added bibtool-fix-libkpathsea-detection.patch and build with + libkpathsea + +------------------------------------------------------------------- +Sun Apr 3 22:57:18 UTC 2011 - gber@opensuse.org + +- initial packaging + diff --git a/bibtool.spec b/bibtool.spec new file mode 100644 index 0000000..359a043 --- /dev/null +++ b/bibtool.spec @@ -0,0 +1,86 @@ +# +# spec file for package bibtool +# +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 Guido Berhoerster. +# +# 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: bibtool +Version: 2.51 +Release: 1 +License: GPLv1 +Summary: Tool for Manipulating BibTeX Databases +Url: http://bibtool.sarovar.org/ +Group: Productivity/Publishing/TeX/Utilities +Source: BibTool-%{version}.tar.bz2 +Patch0: %{name}-honor-cflags.patch +Patch1: %{name}-use-system-regex.patch +Patch2: %{name}-fix-libkpathsea-detection.patch +BuildRequires: texlive-latex +BuildRequires: texlive-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +BibTool is a tool for manipulating BibTeX databases. BibTeX provides a means to +integrate citations into LaTeX documents. BibTool allows the manipulation of +BibTeX files which goes beyond the possibilities - and intentions - of BibTeX. + +%package doc +License: GPLv1 +Summary: Documentation for bibtool +Group: Documentation/Other +Requires: %{name} = %{version} +BuildArch: noarch + +%description doc +This package contains the documentation for bibtool. + +%prep +%setup -q -n BibTool +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%build +autoreconf -fi +%configure +make %{?_smp_mflags} +ln -s makefile Makefile +make %{?_smp_mflags} doc +mkdir examples +sed 's|#!/usr/local/bin/tclsh|#!/usr/bin/tclsh|' Tcl/bibtool.tcl \ + >examples/bibtool.tcl +sed 's|#!/usr/local/bin/perl|#!/usr/bin/perl|' Perl/bibtool.pl \ + >examples/bibtool.pl +chmod 755 examples/* + +%install +make INSTALLPREFIX=%{buildroot} install +make INSTALLPREFIX=%{buildroot} install-man + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc COPYING README examples +%doc %attr(0644,root,root) %{_mandir}/man1/bibtool.1* +%{_bindir}/bibtool +%{_libdir}/BibTool + +%files doc +%defattr(-,root,root,-) +%doc COPYING Doc/bibtool.pdf Doc/ref_card.pdf + +%changelog