Merge upstream version 2.0.1 from upstream into tizen
[platform/upstream/libjpeg-turbo.git] / packaging / libjpeg-turbo.spec
1 %define libver  8.1.2
2
3 Name:           libjpeg-turbo
4 Version:        2.0.1
5 Release:        1
6 Summary:        A MMX/SSE2 accelerated library for manipulating JPEG image files
7 License:        BSD License (BSD 3-clause, Historic Permission Notice and Disclaimer, libjpeg License)
8 Group:          Graphics & UI Framework/Libraries
9 Url:            http://sourceforge.net/projects/libjpeg-turbo
10 Source0:        %{name}-%{version}.tar.gz
11 Source1001:     libjpeg-turbo.manifest
12 BuildRequires:  cmake
13 BuildRequires:  gcc-c++
14 BuildRequires:  libtool
15 BuildRequires:  yasm
16
17 %description
18 The libjpeg-turbo package contains a library of functions for manipulating
19 JPEG images.
20
21 %package -n libjpeg
22
23 Version:        %{libver}
24 Release:        0
25 Summary:        The MMX/SSE accelerated JPEG compression/decompression library
26 Group:          Graphics & UI Framework/Libraries
27
28 Provides:       libjpeg = %{version}
29 Provides:       libjpeg8
30 Obsoletes:      libjpeg < %{version}
31
32 %description -n libjpeg
33 This library contains MMX/SSE accelerated functions for manipulating
34 JPEG images.
35
36 %package -n libjpeg-devel
37 Version:        %{libver}
38 Release:        0
39 Summary:        Development Tools for applications which will use the Libjpeg Library
40 Group:          Graphics & UI Framework/Development
41
42 Provides:       libjpeg-turbo-devel
43 Requires:       libjpeg = %{version}
44 Provides:       libjpeg-devel = %{version}
45 Obsoletes:      libjpeg-devel < %{version}
46
47 %description -n libjpeg-devel
48 The libjpeg-devel package includes the header files and libraries
49 necessary for compiling and linking programs which will manipulate JPEG
50 files using the libjpeg library.
51
52 %prep
53 %setup -q
54 cp %{SOURCE1001} .
55
56 %build
57 %if "%{tizen_profile_name}" == "tv"
58 echo "tizen_product_tv"
59 export CFLAGS="$CFLAGS -D_TIZEN_PRODUCT_TV -D_USE_PRODUCT_TV -DCOLOR_PICKER_ENABLE"
60 %endif
61 %cmake . -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=TRUE -DENABLE_STATIC=FALSE -DWITH_JPEG8=TRUE
62 %__make %{?jobs:-j%jobs}
63
64 %install
65 rm -rf %{buildroot}
66
67 %make_install
68
69 # Remove unwanted files
70 rm %{buildroot}%{_bindir}/*
71
72 # Remove docs, we'll select docs manually
73 rm -rf %{buildroot}%{_datadir}/doc/
74
75 %post -n libjpeg -p /sbin/ldconfig
76
77 %postun -n libjpeg -p /sbin/ldconfig
78
79 %docs_package
80
81 %files
82 %manifest %{name}.manifest
83 %defattr(-,root,root)
84 %license README.ijg
85 %license COPYING
86
87 %files -n libjpeg
88 %manifest %{name}.manifest
89 %defattr(-,root,root)
90 %{_libdir}/libturbojpeg.so.*
91 %{_libdir}/libjpeg.so.*
92 %license README.ijg
93 %license COPYING
94
95 %files -n libjpeg-devel
96 %defattr(-,root,root)
97 %{_includedir}/*.h
98 %{_libdir}/pkgconfig/libturbojpeg.pc
99 %{_libdir}/pkgconfig/libjpeg.pc
100 %{_libdir}/libturbojpeg.so
101 %{_libdir}/libjpeg.so
102 %doc coderules.txt jconfig.txt libjpeg.txt structure.txt example.txt
103
104 %changelog