ea394258ab570744b83276358e4b633e341b3667
[platform/upstream/libjpeg6.git] / packaging / libjpeg6.spec
1 Name:           libjpeg6
2 Version:        6b
3 Release:        0
4 License:        IJG
5 Summary:        A library for manipulating JPEG image format files
6 URL:            http://www.ijg.org/
7 Group:          System/Libraries
8 Source:         jpegsrc.v%{version}.tar.gz
9 BuildRequires:  autoconf
10 BuildRequires:  libtool
11
12 %description
13 The libjpeg package contains a library of functions for manipulating
14 JPEG images, as well as simple client programs for accessing the
15 libjpeg functions.  Libjpeg client programs include cjpeg, djpeg,
16 jpegtran, rdjpgcom and wrjpgcom.  Cjpeg compresses an image file into
17 JPEG format.  Djpeg decompresses a JPEG file into a regular image
18 file.  Jpegtran can perform various useful transformations on JPEG
19 files.  Rdjpgcom displays any text comments included in a JPEG file.
20 Wrjpgcom inserts text comments into a JPEG file.
21
22 %package devel
23 Summary:        Development tools for programs which will use the libjpeg library
24 Group:          Development/Libraries
25 Requires:       libjpeg6 = %{version}-%{release}
26 Conflicts:      libjpeg-turbo
27 Conflicts:      libjpeg-devel
28
29 %description devel
30 The libjpeg-devel package includes the header files and documentation
31 necessary for developing programs which will manipulate JPEG files using
32 the libjpeg library.
33
34 If you are going to develop programs which will manipulate JPEG images,
35 you should install libjpeg-devel.  You'll also need to have the libjpeg
36 package installed.
37
38
39 %prep
40 %setup -q -n jpeg-%{version}
41
42 # libjpeg 6b includes a horribly obsolete version of libtool.
43 # Blow it away and replace with build system's version.
44 rm -f ltmain.sh ltconfig aclocal.m4
45
46 %build
47 %reconfigure --enable-shared --disable-static
48
49 make libdir=%{_libdir} %{?_smp_mflags}
50
51 %check
52 LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH make test libdir=%{_libdir}
53
54 %install
55 mkdir -p %{buildroot}%{_bindir}
56 mkdir -p %{buildroot}%{_includedir}
57 mkdir -p %{buildroot}%{_libdir}
58 mkdir -p %{buildroot}%{_mandir}/man1
59
60 # The make_install macro doesn't work here...
61 %makeinstall
62
63 # Work around the broken makefiles...
64 mv %{buildroot}%{_mandir}/*.1 %{buildroot}%{_mandir}/man1
65 rm -f %{buildroot}%{_libdir}/libjpeg.la
66
67
68 %post -p /sbin/ldconfig
69
70 %postun -p /sbin/ldconfig
71
72
73 %docs_package
74
75 %files
76 %{_libdir}/libjpeg.so.*
77
78 %files devel
79 %{_bindir}/*
80 %{_includedir}/*.h
81 %{_libdir}/*.so