]>
Commit | Line | Data |
---|---|---|
0262a74e KK |
1 | %define _name OpenJPEG |
2 | %define _ver %(echo %{version} | tr . _) | |
3 | Summary: An open-source JPEG 2000 codec | |
4 | Name: openjpeg | |
5 | Version: 1.3 | |
255b5c10 | 6 | Release: 1 |
0262a74e KK |
7 | Source0: http://www.openjpeg.org/%{name}_v%{_ver}.tar.gz |
8 | # Source0-md5: f9a3ccfa91ac34b589e9bf7577ce8ff9 | |
9 | Patch0: %{name}-install.patch | |
10 | License: BSD | |
11 | Group: Libraries | |
12 | URL: http://www.openjpeg.org/ | |
51bd02bf | 13 | BuildRequires: sed >= 4.0 |
0262a74e KK |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
15 | ||
16 | %description | |
17 | The OpenJPEG library is an open-source JPEG 2000 codec written in C | |
18 | language. It has been developed in order to promote the use of JPEG | |
19 | 2000, the new still-image comp ession standard from the Joint | |
20 | Photographic Experts Group (JPEG). | |
21 | ||
22 | %package devel | |
23 | Summary: Development tools for programs using the OpenJPEG library | |
24 | Group: Development/Libraries | |
25 | Requires: %{name} = %{version} | |
26 | Provides: %{name}-devel = %{version}-%{release} | |
27 | ||
28 | %description devel | |
29 | This package contains the header files and libraries needed for | |
30 | developing programs using the OpenJPEG library. | |
31 | ||
32 | %prep | |
33 | %setup -q -n %{_name}_v%{_ver} | |
34 | %patch0 -p1 | |
51bd02bf | 35 | sed 's/$(CC) -s/$(CC) $(CFLAGS) $(LDFLAGS)/' -i Makefile |
3eabfef4 | 36 | sed 's/-lstdc++//' -i Makefile |
0262a74e KK |
37 | |
38 | %build | |
51bd02bf | 39 | %{__make} \ |
3eabfef4 | 40 | CC="%{__cc}" \ |
51bd02bf | 41 | CFLAGS="%{rpmcflags} -fPIC" \ |
42 | LDFLAGS="%{rpmldflags}" | |
0262a74e KK |
43 | |
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
51bd02bf | 46 | %{__make} install \ |
47 | DESTDIR=$RPM_BUILD_ROOT \ | |
48 | INSTALL_LIBDIR=%{_libdir} \ | |
49 | INSTALL_INCLUDE=%{_includedir} | |
50 | ||
0262a74e KK |
51 | cd $RPM_BUILD_ROOT%{_libdir} |
52 | ln -sf libopenjpeg.so.? libopenjpeg.so | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %post -p /sbin/ldconfig | |
58 | %postun -p /sbin/ldconfig | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
62 | %attr(755,root,root) %{_libdir}/libopenjpeg-*.*.*.*.so | |
63 | %attr(755,root,root) %ghost %{_libdir}/libopenjpeg.so.? | |
64 | ||
65 | %files devel | |
66 | %defattr(644,root,root,755) | |
67 | %{_includedir}/%{name}.h | |
68 | %{_libdir}/libopenjpeg.a | |
69 | %{_libdir}/libopenjpeg.so |