Bump to 4.1.0
[platform/upstream/tiff.git] / packaging / tiff.spec
1 Name:           tiff
2 Version:        4.1.0
3 Release:        1
4 License:        libtiff
5 Summary:        Tools for Converting from and to the Tiff Format
6 Url:            https://gitlab.com/libtiff/libtiff
7 Group:          Productivity/Graphics/Convertors
8 Source:         tiff-%{version}.tar.bz2
9 Source3:        baselibs.conf
10 Source1001:     tiff.manifest
11 BuildRequires:  gcc-c++
12 BuildRequires:  libjpeg-devel
13 BuildRequires:  libtool
14 BuildRequires:  lzma-devel
15 BuildRequires:  pkg-config
16 BuildRequires:  pkgconfig(zlib)
17 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
18
19 %description
20 This package contains the library and support programs for the TIFF
21 image format.
22
23 %package -n libtiff
24 Summary:        The Tiff Library (with JPEG and compression support)
25 Group:          System/Libraries
26
27 %description -n libtiff
28 This package includes the tiff libraries. To link a program with
29 libtiff, you will have to add -ljpeg and -lz to include the necessary
30 libjpeg and libz in the linking process.
31
32 %package -n libtiff-devel
33 Summary:        Development Tools for Programs which will use the libtiff Library
34 Group:          Development/Libraries/C and C++
35 Requires:       glibc-devel
36 Requires:       libstdc++-devel
37 Requires:       libtiff = %{version}
38
39 %description -n libtiff-devel
40 This package contains the header files and static libraries for
41 developing programs which will manipulate TIFF format image files using
42 the libtiff library.
43
44 %prep
45 %setup -q
46 cp %{SOURCE1001} .
47
48 %build
49 %configure --disable-static --with-pic
50 make %{?_smp_mflags}
51
52 %install
53 mkdir -p %{buildroot}/{%{_mandir}/{man1,man3},usr/{bin,lib,include}}
54 %make_install
55 for f in `find %{buildroot}/%{_mandir} -type f -print ` ; do
56   if [ `wc -l <$f` -eq 1 ] && grep -q "^\.so " $f ; then
57     linkto=`sed -e "s|^\.so ||" $f`
58     [ -f "`dirname $f`/$linkto" ] && ln -sf "$linkto" $f
59   fi
60 done
61
62 rm -rf %{buildroot}%{_datadir}/doc/tiff*
63 rm -f %{buildroot}/%{_libdir}/*.la
64 find html -name "Makefile*" | xargs rm
65
66
67 %docs_package
68
69 %post -n libtiff -p /sbin/ldconfig
70
71 %postun -n libtiff -p /sbin/ldconfig
72
73 %files
74 %manifest %{name}.manifest
75 %defattr(-,root,root)
76 %{_bindir}/*
77 %license COPYRIGHT
78
79 %files -n libtiff
80 %manifest %{name}.manifest
81 %license COPYRIGHT
82 %{_libdir}/*.so.*
83
84 %files -n libtiff-devel
85 %manifest %{name}.manifest
86 %{_includedir}/*
87 %{_libdir}/*.so
88 %{_libdir}/pkgconfig/*.pc
89