]>
Commit | Line | Data |
---|---|---|
029e7ab3 CM |
1 | # TODO: |
2 | # - Docs | |
029e7ab3 CM |
3 | # - Get upstream to include proper configure! |
4 | ||
5 | %define _packname LibRaw | |
6 | ||
7 | Summary: LibRaw is a library for reading RAW files | |
8 | Name: libraw | |
a9095c77 | 9 | Version: 0.10.0 |
a20b088a | 10 | Release: 1 |
029e7ab3 CM |
11 | License: LGPL 2.1 / CDDL 1.0 / LibRaw Software License |
12 | Group: Libraries | |
a20b088a JK |
13 | Source0: http://www.libraw.org/data/%{_packname}-%{version}.tar.gz |
14 | # Source0-md5: 248456748c8310c99c3593bfa6bf71be | |
15 | Patch0: %{name}-pkgconfig.patch | |
029e7ab3 CM |
16 | URL: http://www.libraw.org |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
20 | LibRaw is a library for reading RAW files obtained from digital photo | |
21 | cameras (CRW/CR2, NEF, RAF, DNG, and others). | |
22 | ||
23 | LibRaw is based on the source codes of the dcraw utility, where part | |
24 | of drawbacks have already been eliminated and part will be fixed in | |
25 | future. The users of the library are provided with API to be built | |
26 | into their software programs. | |
27 | ||
a20b088a JK |
28 | %package samples |
29 | Summary: libraw sample programs | |
30 | Group: Applications | |
31 | ||
32 | %description samples | |
33 | LibRaw sample programs. | |
34 | ||
029e7ab3 | 35 | %package devel |
a20b088a | 36 | Summary: Header files for LibRaw |
029e7ab3 | 37 | Group: Development/Libraries |
029e7ab3 CM |
38 | |
39 | %description devel | |
a20b088a | 40 | Static libraries and header files for LibRaw. |
029e7ab3 CM |
41 | |
42 | %package static | |
43 | Summary: Static libraw library | |
44 | Group: Development/Libraries | |
45 | Requires: %{name}-devel = %{version}-%{release} | |
46 | ||
47 | %description static | |
48 | Static FOO library. | |
49 | ||
50 | %prep | |
a20b088a JK |
51 | %setup -q -n %{_packname}-%{version} |
52 | %patch0 -p1 | |
029e7ab3 CM |
53 | |
54 | %build | |
55 | %{__make} | |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | #%{__make} install \ | |
61 | #DESTDIR=$RPM_BUILD_ROOT | |
62 | ||
a20b088a JK |
63 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir},%{_pkgconfigdir}} |
64 | cp -R libraw $RPM_BUILD_ROOT%{_includedir} | |
65 | install lib/libraw{,_r}.a $RPM_BUILD_ROOT%{_libdir} | |
66 | install bin/[a-z]* $RPM_BUILD_ROOT%{_bindir} | |
67 | install *.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
029e7ab3 CM |
68 | |
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %post -p /sbin/ldconfig | |
73 | %postun -p /sbin/ldconfig | |
74 | ||
a20b088a | 75 | %files samples |
029e7ab3 CM |
76 | %defattr(644,root,root,755) |
77 | %attr(755,root,root) %{_bindir}/* | |
78 | ||
79 | %files devel | |
80 | %defattr(644,root,root,755) | |
81 | %{_includedir}/libraw | |
a20b088a JK |
82 | %{_pkgconfigdir}/libraw.pc |
83 | %{_pkgconfigdir}/libraw_r.pc | |
84 | %{_libdir}/libraw.a | |
85 | %{_libdir}/libraw_r.a | |
029e7ab3 | 86 | |
a20b088a JK |
87 | %if 0 |
88 | # only static library built, included in the -devel package | |
029e7ab3 CM |
89 | %files static |
90 | %defattr(644,root,root,755) | |
91 | %{_libdir}/libraw.a | |
a20b088a JK |
92 | %{_libdir}/libraw_r.a |
93 | %endif |