Git init
[external/giflib.git] / packaging / giflib.spec
1 Summary: Library for manipulating GIF format image files
2 Name: giflib
3 Version: 4.1.6
4 Release: 9
5 License: MIT
6 URL: http://sourceforge.net/projects/giflib/
7 Source0: http://downloads.sourceforge.net/giflib/giflib-%{version}.tar.bz2
8 Group: System/Libraries
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
10 BuildRequires: libX11-devel, libICE-devel, libSM-devel, libXt-devel
11
12 Obsoletes: libungif <= %{version}-%{release}
13 Provides: libungif <= %{version}-%{release}
14
15 %description
16 The giflib package contains a shared library of functions for
17 loading and saving GIF format image files.  It is API and ABI compatible
18 with libungif, the library which supported uncompressed GIFs while the
19 Unisys LZW patent was in effect.
20
21 Install the giflib package if you need to write programs that use GIF files.
22 You should also install the giflib-utils package if you need some simple
23 utilities to manipulate GIFs.
24
25 %package devel
26 Summary: Development tools for programs which will use the libungif library
27 Group: Development/Libraries
28 Requires: %{name} = %{version}-%{release}
29 Provides: libungif-devel <= %{version}-%{release}
30 Obsoletes: libungif-devel <= %{version}-%{release}
31
32 %description devel
33 This package contains the static libraries, header files and
34 documentation necessary for development of programs that will use the
35 giflib library to load and save GIF format image files.
36
37 You should install this package if you need to develop programs which
38 will use giflib library functions.  You'll also need to install the
39 giflib package.
40
41 %package utils
42 Summary: Programs for manipulating GIF format image files
43 Group: Applications/Multimedia
44 Requires: %{name} = %{version}-%{release}
45 Obsoletes: libungif-progs <= %{version}-%{release}
46
47 %description utils
48 The giflib-utils package contains various programs for manipulating
49 GIF format image files.
50
51 Install this package if you need to manipulate GIF format image files.
52 You'll also need to install the giflib package.
53
54 %prep
55 %setup -q
56
57 %build
58 %configure
59 make %{?_smp_mflags} all
60
61 MAJOR=`echo '%{version}' | sed 's/\([0-9]\+\)\..*/\1/'`
62 %{__cc} $RPM_OPT_FLAGS -shared -Wl,-soname,libungif.so.$MAJOR -Llib/.libs -lgif -o libungif.so.%{version}
63
64 %install
65 rm -rf ${RPM_BUILD_ROOT}
66
67 %make_install
68
69 install -m 0755 -p libungif.so.%{version} $RPM_BUILD_ROOT%{_libdir}
70 ln -sf libungif.so.%{version} ${RPM_BUILD_ROOT}%{_libdir}/libungif.so.4
71 ln -sf libungif.so.4 ${RPM_BUILD_ROOT}%{_libdir}/libungif.so
72
73
74 %clean
75 rm -rf ${RPM_BUILD_ROOT}
76
77 %post -p /sbin/ldconfig
78
79 %postun -p /sbin/ldconfig
80
81 %files 
82 %{_libdir}/lib*.so.*
83
84 %files devel
85 %{_libdir}/lib*.so
86 %{_includedir}/*.h
87
88 %files utils
89 %{_bindir}/*
90