| 1 |
|
|---|
| 2 | # feature macro to enable samples (or not)
|
|---|
| 3 | %if 0%{?rhel} != 7
|
|---|
| 4 | %global samples 1
|
|---|
| 5 | %endif
|
|---|
| 6 |
|
|---|
| 7 | Summary: Library for reading RAW files obtained from digital photo cameras
|
|---|
| 8 | Name: libraw
|
|---|
| 9 | Version: 0.21.1
|
|---|
| 10 | Release: 1%{?dist}
|
|---|
| 11 | License: BSD and (CDDL-1.0 or LGPLv2)
|
|---|
| 12 | URL: http://www.libraw.org
|
|---|
| 13 |
|
|---|
| 14 | BuildRequires: gcc-c++
|
|---|
| 15 | BuildRequires: pkgconfig(lcms2)
|
|---|
| 16 | BuildRequires: pkgconfig(jasper)
|
|---|
| 17 | BuildRequires: pkgconfig(libjpeg)
|
|---|
| 18 | BuildRequires: autoconf automake libtool
|
|---|
| 19 | BuildRequires: make
|
|---|
| 20 |
|
|---|
| 21 | %if !0%{?os2_version}
|
|---|
| 22 | Source0: http://github.com/LibRaw/LibRaw/archive/%{version}.tar.gz
|
|---|
| 23 | %else
|
|---|
| 24 | %scm_source github https://github.com/Tellie//%{name}-os2 %{version}-os2
|
|---|
| 25 | %endif
|
|---|
| 26 | Patch0: LibRaw-pkgconfig.patch
|
|---|
| 27 |
|
|---|
| 28 | Provides: bundled(dcraw) = 9.25
|
|---|
| 29 |
|
|---|
| 30 | %description
|
|---|
| 31 | LibRaw is a library for reading RAW files obtained from digital photo
|
|---|
| 32 | cameras (CRW/CR2, NEF, RAF, DNG, and others).
|
|---|
| 33 |
|
|---|
| 34 | LibRaw is based on the source codes of the dcraw utility, where part of
|
|---|
| 35 | drawbacks have already been eliminated and part will be fixed in future.
|
|---|
| 36 |
|
|---|
| 37 | %package devel
|
|---|
| 38 | Summary: LibRaw development libraries
|
|---|
| 39 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
|---|
| 40 |
|
|---|
| 41 | %description devel
|
|---|
| 42 | LibRaw development libraries.
|
|---|
| 43 |
|
|---|
| 44 | This package contains libraries that applications can use to build
|
|---|
| 45 | against LibRaw.
|
|---|
| 46 |
|
|---|
| 47 | %package static
|
|---|
| 48 | Summary: LibRaw static development libraries
|
|---|
| 49 | Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|---|
| 50 |
|
|---|
| 51 | %description static
|
|---|
| 52 | LibRaw static development libraries.
|
|---|
| 53 |
|
|---|
| 54 | %package samples
|
|---|
| 55 | Summary: LibRaw sample programs
|
|---|
| 56 | Requires: %{name} = %{version}-%{release}
|
|---|
| 57 |
|
|---|
| 58 | %description samples
|
|---|
| 59 | LibRaw sample programs
|
|---|
| 60 |
|
|---|
| 61 | %prep
|
|---|
| 62 | %if !0%{?os2_version}
|
|---|
| 63 | %autosetup -p1 -n %{name}-%{version}
|
|---|
| 64 | %else
|
|---|
| 65 | %scm_setup
|
|---|
| 66 | %endif
|
|---|
| 67 |
|
|---|
| 68 | %build
|
|---|
| 69 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 70 | export LIBS="-lcx -lpthread"
|
|---|
| 71 | autoreconf -ifv
|
|---|
| 72 | %configure \
|
|---|
| 73 | --enable-examples=%{?samples:yes}%{!?samples:no} \
|
|---|
| 74 | --enable-jasper \
|
|---|
| 75 | --enable-jpeg \
|
|---|
| 76 | --enable-lcms
|
|---|
| 77 | %if !0%{?os2_version}
|
|---|
| 78 | --enable-openmp
|
|---|
| 79 | %endif
|
|---|
| 80 |
|
|---|
| 81 | # https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath
|
|---|
| 82 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
|---|
| 83 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|---|
| 84 |
|
|---|
| 85 | %if !0%{?os2_version}
|
|---|
| 86 | %make_build
|
|---|
| 87 | %else
|
|---|
| 88 | make %{?_smp_mflags}
|
|---|
| 89 | %endif
|
|---|
| 90 |
|
|---|
| 91 | %install
|
|---|
| 92 | cp -pr doc manual
|
|---|
| 93 | chmod 644 LICENSE.CDDL LICENSE.LGPL COPYRIGHT Changelog.txt
|
|---|
| 94 | chmod 644 manual/*.html
|
|---|
| 95 |
|
|---|
| 96 | # The Libraries
|
|---|
| 97 | %make_install
|
|---|
| 98 |
|
|---|
| 99 | rm -rfv samples/.deps
|
|---|
| 100 | rm -fv samples/.dirstamp
|
|---|
| 101 | rm -fv samples/*.o
|
|---|
| 102 |
|
|---|
| 103 | rm -fv %{buildroot}%{_libdir}/lib*.la
|
|---|
| 104 |
|
|---|
| 105 | %if !0%{?os2_version}
|
|---|
| 106 | %ldconfig_scriptlets
|
|---|
| 107 | %endif
|
|---|
| 108 |
|
|---|
| 109 | %files
|
|---|
| 110 | %defattr(-,root,root)
|
|---|
| 111 | %doc Changelog.txt
|
|---|
| 112 | %license LICENSE.CDDL LICENSE.LGPL COPYRIGHT
|
|---|
| 113 | %if !0%{?os2_version}
|
|---|
| 114 | %{_libdir}/libraw.so.23*
|
|---|
| 115 | %{_libdir}/libraw_r.so.23*
|
|---|
| 116 | %else
|
|---|
| 117 | %{_libdir}/*.dll
|
|---|
| 118 | %endif
|
|---|
| 119 |
|
|---|
| 120 | %files static
|
|---|
| 121 | %defattr(-,root,root)
|
|---|
| 122 | %if !0%{?os2_version}
|
|---|
| 123 | %{_libdir}/libraw.a
|
|---|
| 124 | %{_libdir}/libraw_r.a
|
|---|
| 125 | %else
|
|---|
| 126 | %{_libdir}/raw_r.a
|
|---|
| 127 | %{_libdir}/raw_r_dll.a
|
|---|
| 128 | %{_libdir}/raw_r23_dll.a
|
|---|
| 129 | %endif
|
|---|
| 130 |
|
|---|
| 131 | %files devel
|
|---|
| 132 | %defattr(-,root,root)
|
|---|
| 133 | %doc manual
|
|---|
| 134 | %doc samples
|
|---|
| 135 | %{_includedir}/libraw/
|
|---|
| 136 | %if !0%{?os2_version}
|
|---|
| 137 | %{_libdir}/libraw.so
|
|---|
| 138 | %{_libdir}/libraw_r.so
|
|---|
| 139 | %else
|
|---|
| 140 | %{_libdir}/raw.a
|
|---|
| 141 | %{_libdir}/raw_dll.a
|
|---|
| 142 | %{_libdir}/raw23_dll.a
|
|---|
| 143 | %endif
|
|---|
| 144 | %{_libdir}/pkgconfig/libraw.pc
|
|---|
| 145 | %{_libdir}/pkgconfig/libraw_r.pc
|
|---|
| 146 | %exclude %{_docdir}/libraw/*
|
|---|
| 147 |
|
|---|
| 148 | %if 0%{?samples}
|
|---|
| 149 | %defattr(-,root,root)
|
|---|
| 150 | %files samples
|
|---|
| 151 | %{_bindir}/*
|
|---|
| 152 | %endif
|
|---|
| 153 |
|
|---|
| 154 | %changelog
|
|---|
| 155 | * Wed Sep 14 2023 Elbert Pol <elbert.pol@gmail.com> - 0.21.1-1
|
|---|
| 156 | - Updated to latest version.
|
|---|
| 157 |
|
|---|
| 158 | * Thu Oct 15 2020 Elbert Pol <elbert.pol@gmail.com> - 0.20.2-1
|
|---|
| 159 | - Updated to latest version
|
|---|
| 160 |
|
|---|
| 161 | * Thu Jan 31 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-5
|
|---|
| 162 | - Remove dll's from the devel package.
|
|---|
| 163 |
|
|---|
| 164 | * Wed Jan 30 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-4
|
|---|
| 165 | - Add the raw_*.a files to devel package.
|
|---|
| 166 |
|
|---|
| 167 | * Sat Dec 29 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-3
|
|---|
| 168 | - Link with newer Lcms2
|
|---|
| 169 |
|
|---|
| 170 | * Fri Dec 28 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-2
|
|---|
| 171 | - Add patch to source as thats better if have own repo
|
|---|
| 172 |
|
|---|
| 173 | * Thu Dec 27 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-1
|
|---|
| 174 | - First Rpm version OS/2
|
|---|