]> git.pld-linux.org Git - packages/lcms.git/commitdiff
- use libtool to generate correct shared library (with SONAME and PIC); lcms-1_08-1
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 26 Jun 2002 19:58:30 +0000 (19:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  makefiles patch is back
- added progs package (BR: libjpeg, libtiff, zlib for tifficc)
- release 1

Changed files:
    lcms-makefiles.patch -> 1.2
    lcms.spec -> 1.9

lcms-makefiles.patch
lcms.spec

index f0191db46a16f4b34eba526ac558ee13b260c34a..48e4469990dbfb2e0cc57fde24e937f586dce6dd 100644 (file)
-diff -Nur lcms-1.07.orig/Makefile lcms-1.07/Makefile
---- lcms-1.07.orig/Makefile    Thu Jan  1 01:00:00 1970
-+++ lcms-1.07/Makefile Mon Mar 19 00:16:43 2001
-@@ -0,0 +1,5 @@
-+all:
-+      make -C src
-+
-+install:
-+      make -C src install
-diff -Nur lcms-1.07.orig/src/Makefile lcms-1.07/src/Makefile
---- lcms-1.07.orig/src/Makefile        Thu Jan  1 01:00:00 1970
-+++ lcms-1.07/src/Makefile     Mon Mar 19 00:24:36 2001
-@@ -0,0 +1,21 @@
-+all: liblcms.la
-+
-+CC = gcc
-+LIBDIR = /usr/lib
-+INCLUDEDIR = /usr/include
-+
-+LIBOBJS = cmscnvrt.lo cmserr.lo cmsgamma.lo cmsgmt.lo cmsintrp.lo cmsio1.lo \
-+      cmslut.lo cmsmatsh.lo cmsmtrx.lo cmspack.lo cmspcs.lo cmswtpnt.lo \
-+      cmsxform.lo
-+
-+%.lo: %.c
-+      libtool $(CC) $(CFLAGS) -c $*.c
-+
-+liblcms.la: $(LIBOBJS)
-+      libtool $(CC) -o liblcms.la $(LIBOBJS) $(LDFLAGS) -rpath $(LIBDIR)
-+
-+install:
-+      install -d $(DESTDIR)$(LIBDIR)
-+      libtool install liblcms.la $(DESTDIR)$(LIBDIR)
-+      install -d $(DESTDIR)$(INCLUDEDIR)
-+      install lcms.h icc34.h $(DESTDIR)$(INCLUDEDIR)
+diff -Nur lcms-1.08.orig/samples/Makefile lcms-1.08/samples/Makefile
+--- lcms-1.08.orig/samples/Makefile    Fri Nov 16 16:54:28 2001
++++ lcms-1.08/samples/Makefile Wed Jun 26 21:11:22 2002
+@@ -1,14 +1,14 @@
+ SHELL = /bin/sh
+-CFLAGS = -g -O4 -Wall
++CFLAGS = $(OPTFLAGS) -Wall
+ all:  icctrans wtpt
+ icctrans: icctrans.c xgetopt.c
+-      $(CC) $(CFLAGS) icctrans.c xgetopt.c ../src/liblcms.a -I../include -o icctrans -lm
++      $(CC) $(CFLAGS) icctrans.c xgetopt.c $(LDFLAGS) -L../src -L../src/.libs -llcms -I../include -o icctrans -lm
+ wtpt: wtpt.c
+-      $(CC) $(CFLAGS) wtpt.c ../src/liblcms.a -I../include -o wtpt -lm
++      $(CC) $(CFLAGS) wtpt.c $(LDFLAGS) -L../src -L../src/.libs -llcms -I../include -o wtpt -lm
+ install:
+       # Nothing to install
+diff -Nur lcms-1.08.orig/src/Makefile lcms-1.08/src/Makefile
+--- lcms-1.08.orig/src/Makefile        Wed Nov 28 19:45:03 2001
++++ lcms-1.08/src/Makefile     Wed Jun 26 21:15:55 2002
+@@ -1,49 +1,42 @@
+ SHELL = /bin/sh
+-CFLAGS  = -g -O4 -I../include -fomit-frame-pointer -Wall 
++CFLAGS  = $(OPTFLAGS) -I../include -Wall 
+ BASEDIR = $(DESTDIR)/usr
+ BINDIR  = $(BASEDIR)/bin
+ LIBDIR  = $(BASEDIR)/lib
+ INCDIR  = $(BASEDIR)/include
+ VERSION = 1.0.8
+-AR      = ar -cru
+-RANLIB  = ranlib
++VINFO   = 1:8:0
++LIBTOOL = libtool
+-.c.o: 
+-      $(CC) $(CFLAGS) $(LDFLAGS) -c $<
++%.lo: %.c     
++      $(LIBTOOL) $(CC) $(CFLAGS) -c $<
+ SRCS = cmscnvrt.c cmserr.c cmsgamma.c cmsgmt.c cmsintrp.c cmsio1.c \
+       cmslut.c cmsmatsh.c cmsmtrx.c cmspack.c cmspcs.c cmswtpnt.c \
+       cmsxform.c cmssamp.c cmscam97.c 
+-OBJS = $(SRCS:.c=.o)
++OBJS = $(SRCS:.c=.lo)
+-all:  liblcms.a liblcms.so.${VERSION} 
++all:  liblcms.la
+ #
+ # Library
+ #
+-liblcms.a: $(OBJS)
+-      $(AR) liblcms.a $(OBJS)
+-      $(RANLIB) liblcms.a
+-
+-liblcms.so.${VERSION}: $(OBJS) 
+-      -$(CC) $(CFLAGS) $(LDFLAGS) -shared -o liblcms.so.${VERSION} $(OBJS) 
+-      -ln -s liblcms.so.${VERSION} liblcms.so.1
+-      -ln -s liblcms.so.1 liblcms.so
++liblcms.la: $(OBJS)
++      $(LIBTOOL) $(CC) -o liblcms.la $(OBJS) $(LDFLAGS) -rpath $(LIBDIR) -version-info $(VINFO) -lm
+ #
+ # Installation
+ #
+-install: liblcms.a  liblcms.so.${VERSION}
++install: liblcms.la
+       mkdir -p $(BINDIR) $(LIBDIR) $(INCDIR)
+-      -cp -a liblcms.so* $(LIBDIR)
+-      cp -a liblcms.a $(LIBDIR)
++      $(LIBTOOL) install liblcms.la $(LIBDIR)
+       cp ../include/lcms.h ../include/icc34.h $(INCDIR)
+ #
+@@ -60,4 +53,4 @@
+ #
+ clean:
+-      -rm $(OBJS)  liblcms.a liblcms.so.${VERSION} liblcms.so.1 liblcms.so
++      -rm -rf $(OBJS) liblcms* .libs
+diff -Nur lcms-1.08.orig/testbed/Makefile lcms-1.08/testbed/Makefile
+--- lcms-1.08.orig/testbed/Makefile    Tue Nov 13 21:54:50 2001
++++ lcms-1.08/testbed/Makefile Wed Jun 26 21:16:29 2002
+@@ -1,16 +1,16 @@
+ SHELL = /bin/sh
+-CFLAGS = -g -O4 -fomit-frame-pointer -Wall -I../include
++CFLAGS = $(OPTFLAGS) -Wall -I../include
+ testcms.o: testcms.c
+-testcms: testcms.o ../src/liblcms.a
+-      $(CC) $(CFLAGS) testcms.o ../src/liblcms.a -o $@ -lm
++testcms: testcms.o ../src/liblcms.la
++      $(CC) $(CFLAGS) testcms.o $(LDFLAGS) -L../src -L../src/.libs -llcms -o $@ -lm
+ all: testcms test
+ test: testcms
+-      ./testcms
++      LD_LIBRARY_PATH=../src/.libs ./testcms
+ install:
+       # Nothing to install
+diff -Nur lcms-1.08.orig/tifficc/Makefile lcms-1.08/tifficc/Makefile
+--- lcms-1.08.orig/tifficc/Makefile    Fri Nov 16 16:54:58 2001
++++ lcms-1.08/tifficc/Makefile Wed Jun 26 21:17:14 2002
+@@ -1,11 +1,11 @@
+ SHELL = /bin/sh
+-CFLAGS = -g -O4 -fomit-frame-pointer -Wall -I../include -I/usr/include -I/usr/local/include
++CFLAGS = $(OPTFLAGS) -Wall -I../include
+ all:  tifficc
+ tifficc: tifficc.o getopt.o
+-      $(CC) $(CFLAGS) tifficc.o getopt.o ../src/liblcms.a -o $@ -lm -ljpeg -ltiff -lz
++      $(CC) $(CFLAGS) tifficc.o getopt.o $(LDFLAGS) -L../src -L../src/.libs -llcms -o $@ -lm -ljpeg -ltiff -lz
+ tifficc.o: tifficc.c
+ getopt.o: getopt.c
index fe43df26c0030e60eb7f4f078187e627385307f6..044f04e973c1d0ae581329a8f97f38690ff516da 100644 (file)
--- a/lcms.spec
+++ b/lcms.spec
@@ -2,12 +2,16 @@ Summary:      Little CMS - a library to transform between colour profiles
 Summary(pl):   Little CMS - biblioteka do konwersji miêdzy profilami kolorów
 Name:          lcms
 Version:       1.08
-Release:       0.1
+Release:       1
 License:       LGPL
 Group:         Libraries
 Source0:       http://www.littlecms.com/%{name}-%{version}.tar.gz
-#Patch0:               %{name}-makefiles.patch
+Patch0:                %{name}-makefiles.patch
 URL:           http://www.littlecms.com/
+BuildRequires: libjpeg-devel
+BuildRequires: libtiff-devel
+BuildRequires: libtool
+BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # There is no pretty description in source archive... use these.
@@ -48,14 +52,27 @@ Static version of liblcms.
 %description static -l pl
 Statyczna biblioteka liblcms.
 
+%package progs
+Summary:       Example and demonstration programs for Little CMS
+Summary(pl):   Programy przyk³adowe i demonstracyjne do Little CMS
+Group:         Applications/Graphics
+Requires:      %{name} = %{version}
+
+%description progs
+Example and demonstration programs for Little CMS.
+
+%description progs -l pl
+Programy przyk³adowe i demonstracyjne do Little CMS.
+
 %prep
 %setup -q
-#%patch0 -p1
+%patch0 -p1
 
 %build
-%{__make} \
-       CFLAGS="%{rpmcflags}" \
-       LDFLAGS="%{rpmldflags}"
+%{__make} all tifficc \
+       OPTFLAGS="%{rpmcflags}" \
+       LDFLAGS="%{rpmldflags}" \
+       CC="%{__cc}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -63,6 +80,8 @@ install -d $RPM_BUILD_ROOT
 
 %{__make} install DESTDIR=$RPM_BUILD_ROOT
 
+install samples/{icctrans,wtpt} tifficc/tifficc $RPM_BUILD_ROOT%{_bindir}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -71,16 +90,20 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README
+%doc AUTHORS NEWS README
 %attr(755,root,root) %{_libdir}/lib*.so.*.*
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc/*
 %{_libdir}/lib*.so
-#%attr(755,root,root) %{_libdir}/lib*.la
+%attr(755,root,root) %{_libdir}/lib*.la
 %{_includedir}/*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/lib*.a
+
+%files progs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/*
This page took 0.388613 seconds and 4 git commands to generate.