Accepting request 113328 from home:aljex:branches:graphics
use major version instead of full version in compiled soname OBS-URL: https://build.opensuse.org/request/show/113328 OBS-URL: https://build.opensuse.org/package/show/graphics/jbigkit?expand=0&rev=4
This commit is contained in:
parent
a75245f1b6
commit
99a7fcaa4f
@ -1,7 +1,128 @@
|
||||
--- jbigkit/pbmtools/Makefile.shlib 2008-08-25 23:26:39.000000000 +0100
|
||||
+++ jbigkit/pbmtools/Makefile 2008-09-03 16:41:20.000000000 +0100
|
||||
@@ -5,23 +5,23 @@
|
||||
CC = gcc
|
||||
diff -aur jbigkit/libjbig/Makefile jbigkit+/libjbig/Makefile
|
||||
--- jbigkit/libjbig/Makefile 2008-08-30 13:20:52.000000000 -0400
|
||||
+++ jbigkit+/libjbig/Makefile 2012-04-12 04:56:11.000000000 -0400
|
||||
@@ -2,28 +2,33 @@
|
||||
# $Id: Makefile 1285 2008-08-18 13:36:45Z mgk25 $
|
||||
|
||||
# Select an ANSI/ISO C compiler here, GNU gcc is recommended
|
||||
-CC = gcc
|
||||
+CC ?= gcc
|
||||
|
||||
# Options for the compiler: A high optimization level is suggested
|
||||
-CFLAGS = -g -O -Wall -ansi -pedantic # --coverage
|
||||
+CFLAGS ?= -g -O -Wall -ansi -pedantic # --coverage
|
||||
+PICFLAGS := -fPIC -DPIC
|
||||
|
||||
-all: libjbig.a tstcodec tstcodec85
|
||||
+all: libjbig.so.$(SOVERSION) libjbig85.so.$(SOVERSION) tstcodec tstcodec85
|
||||
|
||||
-tstcodec: tstcodec.o jbig.o jbig_ar.o
|
||||
- $(CC) $(CFLAGS) -o tstcodec $+
|
||||
+tstcodec: tstcodec.o libjbig.so
|
||||
+ $(CC) $(CFLAGS) -o tstcodec $< -L. -ljbig
|
||||
|
||||
-tstcodec85: tstcodec85.o jbig85.o jbig_ar.o
|
||||
- $(CC) $(CFLAGS) -o tstcodec85 $+
|
||||
+tstcodec85: tstcodec85.o libjbig85.so
|
||||
+ $(CC) $(CFLAGS) -o tstcodec85 $^ -L. -ljbig
|
||||
|
||||
-libjbig.a: jbig.o jbig_ar.o
|
||||
- rm -f libjbig.a
|
||||
- ar rc libjbig.a jbig.o jbig_ar.o
|
||||
- -ranlib libjbig.a
|
||||
+%.so: %.so.$(VERSION)
|
||||
+ ln -sf $< $@
|
||||
|
||||
-libjbig85.a: jbig85.o jbig_ar.o
|
||||
- rm -f libjbig85.a
|
||||
- ar rc libjbig85.a jbig85.o jbig_ar.o
|
||||
- -ranlib libjbig85.a
|
||||
+%.so.$(SOVERSION): %.so.$(VERSION)
|
||||
+ ln -sf $< $@
|
||||
+
|
||||
+libjbig.so.$(VERSION): jbig.o jbig_ar.o
|
||||
+ $(CC) $(CFLAGS) -shared -Wl,-soname,libjbig.so.$(SOVERSION) -o $@ $^
|
||||
+
|
||||
+libjbig85.so.$(VERSION): jbig85.o jbig_ar.o
|
||||
+ $(CC) $(CFLAGS) -shared -Wl,-soname,libjbig85.so.$(SOVERSION) -o $@ $^
|
||||
+
|
||||
+jbig.o jbig85.o jbig_ar.o: CFLAGS += $(PICFLAGS)
|
||||
|
||||
jbig.o: jbig.c jbig.h jbig_ar.h
|
||||
jbig85.o: jbig85.c jbig85.h jbig_ar.h
|
||||
@@ -37,12 +42,12 @@
|
||||
--msgid-bugs-address='http://www.cl.cam.ac.uk/~mgk25/jbigkit/' $+
|
||||
|
||||
test: tstcodec tstcodec85
|
||||
- ./tstcodec
|
||||
- ./tstcodec85
|
||||
+ LD_LIBRARY_PATH=`pwd` ./tstcodec
|
||||
+ LD_LIBRARY_PATH=`pwd` ./tstcodec85
|
||||
|
||||
t82test.pbm: tstcodec
|
||||
- ./tstcodec $@
|
||||
+ LD_LIBRARY_PATH=`pwd` ./tstcodec $@
|
||||
|
||||
clean:
|
||||
rm -f *.{o,gcda,gcno,gcov} *~ core gmon.out dbg_d\=??.pbm t82test.pbm
|
||||
- rm -f tstcodec tstcodec85
|
||||
+ rm -f tstcodec tstcodec85 libjbig*.so libjbig*.so.$(SOVERSION) libjbig*.so.$(VERSION)
|
||||
diff -aur jbigkit/Makefile jbigkit+/Makefile
|
||||
--- jbigkit/Makefile 2008-08-30 16:40:22.000000000 -0400
|
||||
+++ jbigkit+/Makefile 2012-04-12 04:55:40.000000000 -0400
|
||||
@@ -2,33 +2,35 @@
|
||||
# $Id: Makefile 1303 2008-08-30 20:16:20Z mgk25 $
|
||||
|
||||
# Select an ANSI/ISO C compiler here, GNU gcc is recommended
|
||||
-CC = gcc
|
||||
+CC ?= gcc
|
||||
|
||||
# Options for the compiler: A high optimization level is suggested
|
||||
CCFLAGS = -O2 -W
|
||||
#CCFLAGS = -O -g -W -Wall -ansi -pedantic #-DDEBUG # developer only
|
||||
|
||||
-CFLAGS = $(CCFLAGS) -I../libjbig
|
||||
+CFLAGS ?= $(CCFLAGS) -I../libjbig
|
||||
|
||||
VERSION=2.0
|
||||
+SOVERSION = $(basename $(VERSION))
|
||||
+export VERSION SOVERSION CFLAGS CC
|
||||
|
||||
all: lib pbm
|
||||
@echo "Enter 'make test' in order to start some automatic tests."
|
||||
|
||||
lib:
|
||||
- (cd libjbig; make "CC=$(CC)" "CFLAGS=$(CFLAGS)")
|
||||
+ make -C libjbig
|
||||
|
||||
pbm: lib
|
||||
- (cd pbmtools; make "CC=$(CC)" "CFLAGS=$(CFLAGS)")
|
||||
+ make -C pbmtools
|
||||
|
||||
test: lib pbm
|
||||
- (cd libjbig; make "CC=$(CC)" "CFLAGS=$(CFLAGS)" test)
|
||||
- (cd pbmtools; make "CC=$(CC)" "CFLAGS=$(CFLAGS)" test)
|
||||
+ LD_LIBRARY_PATH=`pwd`/libjbig make -C libjbig test
|
||||
+ LD_LIBRARY_PATH=`pwd`/libjbig make -C pbmtools test
|
||||
|
||||
clean:
|
||||
rm -f *~ core
|
||||
- (cd libjbig; make clean)
|
||||
- (cd pbmtools; make clean)
|
||||
+ make -C libjbig clean
|
||||
+ make -C pbmtools clean
|
||||
|
||||
distribution: clean
|
||||
rm -f libjbig/libjbig*.a
|
||||
diff -aur jbigkit/pbmtools/Makefile jbigkit+/pbmtools/Makefile
|
||||
--- jbigkit/pbmtools/Makefile 2008-08-25 18:26:39.000000000 -0400
|
||||
+++ jbigkit+/pbmtools/Makefile 2012-04-12 04:55:18.000000000 -0400
|
||||
@@ -2,26 +2,26 @@
|
||||
# $Id: Makefile 1293 2008-08-25 22:26:39Z mgk25 $
|
||||
|
||||
# Select an ANSI/ISO C compiler here, e.g. GNU gcc is recommended
|
||||
-CC = gcc
|
||||
+CC ?= gcc
|
||||
|
||||
# Options for the compiler
|
||||
-CFLAGS = -g -Wall -ansi -pedantic -I../libjbig # --coverage
|
||||
@ -30,7 +151,7 @@
|
||||
$(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
|
||||
|
||||
jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h
|
||||
@@ -29,13 +29,13 @@ pbmtojbg.o: pbmtojbg.c ../libjbig/jbig.h
|
||||
@@ -29,13 +29,13 @@
|
||||
jbgtopbm85.o: jbgtopbm85.c ../libjbig/jbig85.h
|
||||
pbmtojbg85.o: pbmtojbg85.c ../libjbig/jbig85.h
|
||||
|
||||
@ -48,98 +169,3 @@
|
||||
|
||||
test: test82 test85
|
||||
|
||||
--- jbigkit/libjbig/Makefile.shlib 2008-08-30 18:20:52.000000000 +0100
|
||||
+++ jbigkit/libjbig/Makefile 2008-09-03 16:40:43.000000000 +0100
|
||||
@@ -5,25 +5,27 @@
|
||||
CC = gcc
|
||||
|
||||
# Options for the compiler: A high optimization level is suggested
|
||||
-CFLAGS = -g -O -Wall -ansi -pedantic # --coverage
|
||||
+CFLAGS ?= -g -O -Wall -ansi -pedantic # --coverage
|
||||
+PICFLAGS := -fPIC -DPIC
|
||||
|
||||
-all: libjbig.a tstcodec tstcodec85
|
||||
+all: libjbig.so.$(VERSION) tstcodec tstcodec85
|
||||
|
||||
-tstcodec: tstcodec.o jbig.o jbig_ar.o
|
||||
- $(CC) $(CFLAGS) -o tstcodec $+
|
||||
+tstcodec: tstcodec.o libjbig.so
|
||||
+ $(CC) $(CFLAGS) -o tstcodec $< -L. -ljbig
|
||||
|
||||
-tstcodec85: tstcodec85.o jbig85.o jbig_ar.o
|
||||
- $(CC) $(CFLAGS) -o tstcodec85 $+
|
||||
+tstcodec85: tstcodec85.o libjbig85.so
|
||||
+ $(CC) $(CFLAGS) -o tstcodec85 $^ -L. -ljbig
|
||||
|
||||
-libjbig.a: jbig.o jbig_ar.o
|
||||
- rm -f libjbig.a
|
||||
- ar rc libjbig.a jbig.o jbig_ar.o
|
||||
- -ranlib libjbig.a
|
||||
+%.so: %.so.$(VERSION)
|
||||
+ ln -sf $< $@
|
||||
|
||||
-libjbig85.a: jbig85.o jbig_ar.o
|
||||
- rm -f libjbig85.a
|
||||
- ar rc libjbig85.a jbig85.o jbig_ar.o
|
||||
- -ranlib libjbig85.a
|
||||
+libjbig.so.$(VERSION): jbig.o jbig_ar.o
|
||||
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $^
|
||||
+
|
||||
+libjbig85.so.$(VERSION): jbig85.o jbig_ar.o
|
||||
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $^
|
||||
+
|
||||
+jbig.o jbig85.o jbig_ar.o: CFLAGS += $(PICFLAGS)
|
||||
|
||||
jbig.o: jbig.c jbig.h jbig_ar.h
|
||||
jbig85.o: jbig85.c jbig85.h jbig_ar.h
|
||||
@@ -37,12 +39,12 @@ jbig.pot: jbig.c
|
||||
--msgid-bugs-address='http://www.cl.cam.ac.uk/~mgk25/jbigkit/' $+
|
||||
|
||||
test: tstcodec tstcodec85
|
||||
- ./tstcodec
|
||||
- ./tstcodec85
|
||||
+ LD_LIBRARY_PATH=`pwd` ./tstcodec
|
||||
+ LD_LIBRARY_PATH=`pwd` ./tstcodec85
|
||||
|
||||
t82test.pbm: tstcodec
|
||||
- ./tstcodec $@
|
||||
+ LD_LIBRARY_PATH=`pwd` ./tstcodec $@
|
||||
|
||||
clean:
|
||||
rm -f *.{o,gcda,gcno,gcov} *~ core gmon.out dbg_d\=??.pbm t82test.pbm
|
||||
- rm -f tstcodec tstcodec85
|
||||
+ rm -f tstcodec tstcodec85 *.so *.so.$(VERSION)
|
||||
--- jbigkit/Makefile.shlib 2008-08-30 21:40:22.000000000 +0100
|
||||
+++ jbigkit/Makefile 2008-09-03 16:40:43.000000000 +0100
|
||||
@@ -11,24 +11,25 @@ CCFLAGS = -O2 -W
|
||||
CFLAGS = $(CCFLAGS) -I../libjbig
|
||||
|
||||
VERSION=2.0
|
||||
+export VERSION CFLAGS CC
|
||||
|
||||
all: lib pbm
|
||||
@echo "Enter 'make test' in order to start some automatic tests."
|
||||
|
||||
lib:
|
||||
- (cd libjbig; make "CC=$(CC)" "CFLAGS=$(CFLAGS)")
|
||||
+ make -C libjbig
|
||||
|
||||
pbm: lib
|
||||
- (cd pbmtools; make "CC=$(CC)" "CFLAGS=$(CFLAGS)")
|
||||
+ make -C pbmtools
|
||||
|
||||
test: lib pbm
|
||||
- (cd libjbig; make "CC=$(CC)" "CFLAGS=$(CFLAGS)" test)
|
||||
- (cd pbmtools; make "CC=$(CC)" "CFLAGS=$(CFLAGS)" test)
|
||||
+ LD_LIBRARY_PATH=`pwd`/libjbig make -C libjbig test
|
||||
+ LD_LIBRARY_PATH=`pwd`/libjbig make -C pbmtools test
|
||||
|
||||
clean:
|
||||
rm -f *~ core
|
||||
- (cd libjbig; make clean)
|
||||
- (cd pbmtools; make clean)
|
||||
+ make -C libjbig clean
|
||||
+ make -C pbmtools clean
|
||||
|
||||
distribution: clean
|
||||
rm -f libjbig/libjbig*.a
|
||||
|
56
jbigkit.spec
56
jbigkit.spec
@ -17,31 +17,34 @@
|
||||
|
||||
|
||||
Name: jbigkit
|
||||
Version: 2.0
|
||||
# Facilitate http://en.opensuse.org/openSUSE:Shared_library_packaging_policy
|
||||
%define libv 2
|
||||
%define libn libjbig
|
||||
%define libnv %{libn}%{libv}
|
||||
%define ver_maj 2
|
||||
%define ver_min 0
|
||||
Version: %{ver_maj}.%{ver_min}
|
||||
Release: 0
|
||||
Summary: JBIG1 lossless image compression tools
|
||||
License: GPL-2.0+
|
||||
Group: Productivity/Graphics/Convertors
|
||||
Url: http://www.cl.cam.ac.uk/~mgk25/jbigkit/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch0: jbigkit-2.0-shlib.patch
|
||||
Patch0: %{name}-%{version}-shlib.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%package -n %libnv
|
||||
%define libname libjbig
|
||||
%define soversion %ver_maj
|
||||
%define libpkg %{libname}%soversion
|
||||
%define devpkg %{libname}-devel
|
||||
|
||||
%package -n %libpkg
|
||||
Summary: JBIG1 lossless image compression library
|
||||
Group: System/Libraries
|
||||
Provides: %{libn} = %version
|
||||
Provides: %libname = %version
|
||||
|
||||
%package -n %{libn}-devel
|
||||
%package -n %devpkg
|
||||
Summary: JBIG1 lossless image compression library -- development files
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %libnv = %version
|
||||
Requires: %libpkg = %version
|
||||
|
||||
%description -n %libnv
|
||||
%description -n %libpkg
|
||||
JBIG-KIT provides a portable library of compression and decompression
|
||||
functions with a documented interface that you can include very easily
|
||||
into your image or document processing software. In addition, JBIG-KIT
|
||||
@ -56,7 +59,7 @@ JBIG-KIT implements the specification:
|
||||
|
||||
which is commonly referred to as the “JBIG1 standard”
|
||||
|
||||
%description -n %{libn}-devel
|
||||
%description -n %devpkg
|
||||
The libjbig-devel package contains files needed for development using
|
||||
the JBIG-KIT image compression library.
|
||||
|
||||
@ -69,11 +72,10 @@ formats.
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
# TODO install docs/includes to name-with-version-suffix?
|
||||
export CFLAGS="%optflags -I../libjbig" CXXFLAGS="%optflags"
|
||||
%__make %{?_smp_mflags}
|
||||
%__strip libjbig/libjbig.so.%{version}
|
||||
%__strip libjbig/libjbig85.so.%{version}
|
||||
%__strip libjbig/libjbig.so.%version
|
||||
%__strip libjbig/libjbig85.so.%version
|
||||
%__strip pbmtools/pbmtojbg
|
||||
%__strip pbmtools/jbgtopbm
|
||||
%__strip pbmtools/pbmtojbg85
|
||||
@ -83,11 +85,13 @@ export CFLAGS="%optflags -I../libjbig" CXXFLAGS="%optflags"
|
||||
%__make test
|
||||
|
||||
%install
|
||||
%__install -Dm 0755 libjbig/libjbig.so.%{version} %{buildroot}/%{_libdir}/libjbig.so.%version
|
||||
%__install -Dm 0755 libjbig/libjbig85.so.%{version} %{buildroot}/%{_libdir}/libjbig85.so.%version
|
||||
|
||||
%__ln_s -f libjbig.so.%{version} %{buildroot}/%{_libdir}/libjbig.so
|
||||
%__ln_s -f libjbig85.so.%{version} %{buildroot}/%{_libdir}/libjbig85.so
|
||||
%__install -d %{buildroot}/%_libdir
|
||||
%__install -m 0755 libjbig/libjbig.so.%version %{buildroot}/%_libdir
|
||||
%__install -m 0755 libjbig/libjbig85.so.%version %{buildroot}/%_libdir
|
||||
%__ln_s -f libjbig.so.%version %{buildroot}/%{_libdir}/libjbig.so.%soversion
|
||||
%__ln_s -f libjbig85.so.%version %{buildroot}/%{_libdir}/libjbig85.so.%soversion
|
||||
%__ln_s -f libjbig.so.%version %{buildroot}/%{_libdir}/libjbig.so
|
||||
%__ln_s -f libjbig85.so.%version %{buildroot}/%{_libdir}/libjbig85.so
|
||||
|
||||
%__install -d %{buildroot}%_includedir
|
||||
%__install -m 0644 libjbig/jbig*.h %{buildroot}%_includedir
|
||||
@ -103,9 +107,9 @@ export CFLAGS="%optflags -I../libjbig" CXXFLAGS="%optflags"
|
||||
%__ln_s -f pbmtojbg.1 %{buildroot}%{_mandir}/man1/pbmtojbg85.1
|
||||
%__ln_s -f jbgtopbm.1 %{buildroot}%{_mandir}/man1/jbgtopbm85.1
|
||||
|
||||
%post -n %{libnv} -p /sbin/ldconfig
|
||||
%post -n %libpkg -p /sbin/ldconfig
|
||||
|
||||
%postun -n %{libnv} -p /sbin/ldconfig
|
||||
%postun -n %libpkg -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
@ -113,13 +117,13 @@ export CFLAGS="%optflags -I../libjbig" CXXFLAGS="%optflags"
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc COPYING ANNOUNCE TODO CHANGES pbmtools/*.txt
|
||||
|
||||
%files -n %{libnv}
|
||||
%files -n %libpkg
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/%{libn}*.so.*
|
||||
%{_libdir}/%{libname}*.so.*
|
||||
|
||||
%files -n %{libn}-devel
|
||||
%files -n %devpkg
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/%{libn}*.so
|
||||
%{_libdir}/%{libname}*.so
|
||||
%{_includedir}/jbig*.h
|
||||
%doc COPYING ANNOUNCE TODO CHANGES libjbig/*.txt
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user