Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > media > core-release-src > by-pkgid > c864ce3317d45daf7cb5c3124801c40d > files > 6

lensfun-0.3.4-4.mga10.src.rpm

%define lib_major 1
%define lib_name %mklibname lensfun %{lib_major}
%define lib_dev %mklibname lensfun -d

# See https://github.com/darktable-org/darktable/issues/7380#issuecomment-768064808
# about why there are no newer versions in the upstream despite active git master

Name: lensfun
# Epoch added to facilitate update from buggy alpha 0.3.95 with breaking changes to
# new stable release 0.3.3. https://ml.mageia.org/l/arc/dev/2022-10/msg00221.html
Epoch: 1
Version: 0.3.4
Summary: A library to rectify defects introduced by photographic lenses
Release: %mkrel 4
License: LGPLv3 and CC-BY-SA
Group: System/Libraries
URL: https://github.com/lensfun/lensfun
Source0: https://github.com/lensfun/lensfun/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
Source2: README.urpmi
Patch0: 0001-Match-library-file-name-with-soname.patch
Patch7: lensfun-0.3.2-INSTALL_HELPER_SCRIPTS.patch
Patch8: fix-python-module-install.patch
BuildRequires: cmake >= 2.8
BuildRequires: doxygen
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(zlib)
BuildRequires: python3-devel
BuildRequires: python3-docutils

%description
The lensfun library provides an open source database of photographic lenses and
their characteristics. It not only provides a way to read and search the
database, but also provides a set of algorithms for correcting images based on
detailed knowledge of lens properties. Right now lensfun is designed to correct
distortion, transversal (also known as lateral) chromatic aberrations,
vignetting and color contribution of a lens.

%files
%{_datadir}/lensfun
%{_bindir}/lenstool
%{_bindir}/lensfun-add-adapter
%{_bindir}/lensfun-update-data
%{python3_sitelib}/lensfun/
%{python3_sitelib}/lensfun-%{version}.dist-info/
%{_docdir}/lensfun/*.css
%{_docdir}/lensfun/*.html
%{_docdir}/lensfun/*.js
%{_docdir}/lensfun/*.png
%{_docdir}/lensfun/*.svg
%{_mandir}/man1/lensfun-add-adapter.1*
%{_mandir}/man1/lensfun-update-data.1*
%doc README.urpmi

#------------------------------------------------------------------

%package -n %{lib_name}
Summary: A library to rectify defects introduced by photographic lenses
Group: System/Libraries
Requires: %{name}

%description -n	%{lib_name}
A library to rectify defects introduced by photographic lenses.

%files -n %{lib_name}
%{_libdir}/*.so.%{lib_major}

#------------------------------------------------------------------

%package -n	%{lib_dev}
Summary: Development tools for programs which will use the %{name}
Group: Development/C
Requires: %{lib_name} = %{epoch}:%{version}
Provides: %{name}-devel = %{epoch}:%{version}-%{release}

%description -n	%{lib_dev}
This package contains the header files and .so libraries for developing %{name}.

%files -n %{lib_dev}
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/lensfun.pc

#------------------------------------------------------------------

%prep
%setup -q
#{__tar} -C#{_builddir}/#{name}-#{version}/data/db -xf #{SOURCE1}
%autopatch -p1

%py3_shebang_fix \
    apps/lensfun-add-adapter \
    apps/lensfun-update-data

%build
%cmake -DBUILD_TESTS:BOOL=OFF \
       -DBUILD_DOC:BOOL=ON \
       -DBUILD_LENSTOOL:BOOL=ON \
       -DCMAKE_BUILD_TYPE:STRING=Release \
       -DINSTALL_HELPER_SCRIPTS:BOOL=ON \
%ifarch x86_64
       -DBUILD_FOR_SSE=ON -DBUILD_FOR_SSE2=ON \
%else
       -DBUILD_FOR_SSE=OFF -DBUILD_FOR_SSE2=OFF \
%endif
       -DINSTALL_PYTHON_MODULE:BOOL=OFF

%cmake_build

pushd %{_vpath_builddir}/apps
%pyproject_wheel
popd

%install
%cmake_install

pushd %{_vpath_builddir}/apps
%pyproject_install
popd

# README.urpmi
install -Dm644 %{SOURCE2} .

## unpackaged files
# omit g-lensfun-update-data because it needs gksudo which we don't ship
rm -fv %{buildroot}%{_bindir}/g-lensfun-update-data \
       %{buildroot}%{_mandir}/man1/g-lensfun-update-data.*


%changelog
* Tue Apr 02 2024 daviddavid <daviddavid> 1:0.3.4-4.mga10
+ Revision: 2054003
- let's pyproject handled the python module, thus fixing missing files
- enable lenstool support

* Mon Apr 01 2024 daviddavid <daviddavid> 1:0.3.4-3.mga10
+ Revision: 2053704
- do not call distutils anymore thus fixing py3.12 build

* Sat Dec 09 2023 mrambo3501 <mrambo3501> 1:0.3.4-2.mga10
+ Revision: 2016611
- rebuild for py3.12

* Wed Sep 20 2023 mrambo3501 <mrambo3501> 1:0.3.4-1.mga10
+ Revision: 1988576
- version 0.3.4
- update files list

* Tue Nov 01 2022 mrambo3501 <mrambo3501> 1:0.3.3-1.mga9
+ Revision: 1901025
- new stable release 0.3.3
- rediff Patch0
- update bundled lens data

* Mon Aug 08 2022 mrambo3501 <mrambo3501> 0.3.95-5.mga9
+ Revision: 1876130
- use Python's bundled distutils

* Sun Jul 31 2022 mrambo3501 <mrambo3501> 0.3.95-4.mga9
+ Revision: 1873812
- fix files list

* Fri Mar 18 2022 umeabot <umeabot> 0.3.95-3.mga9
+ Revision: 1798964
- Mageia 9 Mass Rebuild

* Sat Feb 12 2022 mrambo3501 <mrambo3501> 0.3.95-2.mga9
+ Revision: 1773586
- rebuild for python 3.10

* Sun Aug 08 2021 luigiwalser <luigiwalser> 0.3.95-1.mga9
+ Revision: 1740635
- 0.3.95
- library major is now 2
- add note in spec about why no new versions are released
- update URLs
- remove upstreamed patches
- add patch from rosa to fix bogus library file name

* Tue Mar 16 2021 tmb <tmb> 0.3.2-14.mga9
+ Revision: 1703819
- rebuild for python 3.9

* Fri Aug 21 2020 joequant <joequant> 0.3.2-13.mga8
+ Revision: 1617383
- fix deps
- fix build

* Tue Aug 11 2020 pterjan <pterjan> 0.3.2-12.mga8
+ Revision: 1613432
- Fix file list, doxygen now generates a svg

* Sun Feb 16 2020 umeabot <umeabot> 0.3.2-11.mga8
+ Revision: 1534473
- Mageia 8 Mass Rebuild
+ wally <wally>
- build with new cmake macros

* Thu Oct 03 2019 mrambo3501 <mrambo3501> 0.3.2-10.mga8
+ Revision: 1449108
- update lens database
- add README.urpmi to notify about ongoing lens updates

* Fri Sep 13 2019 tv <tv> 0.3.2-9.mga8
+ Revision: 1440487
- really rebuild for python-3.8

* Mon Apr 15 2019 wally <wally> 0.3.2-8.mga7
+ Revision: 1390885
- use our preferred cmake build type RelWithDebInfo
- drop unneeded post and postun scriptlets

* Tue Jan 08 2019 ovitters <ovitters> 0.3.2-7.mga7
+ Revision: 1352893
- rebuild for python3 3.7
+ tmb <tmb>
- rebuild for python 3.7

* Sun Sep 23 2018 umeabot <umeabot> 0.3.2-5.mga7
+ Revision: 1298731
- Mageia 7 Mass Rebuild

* Fri Dec 15 2017 mrambo3501 <mrambo3501> 0.3.2-4.mga7
+ Revision: 1182722
- get the correct version of the upstream lens database
- add patches from fedora which fix the building of the python module
- fix license
- generally sync with the fedora spec

* Mon Dec 11 2017 mrambo3501 <mrambo3501> 0.3.2-3.mga7
+ Revision: 1182212
- update lens and camera database files from upstream sources
- enable upstream database management scripts

* Thu Feb 11 2016 umeabot <umeabot> 0.3.2-2.mga6
+ Revision: 955233
- Mageia 6 Mass Rebuild

* Fri Jan 08 2016 luigiwalser <luigiwalser> 0.3.2-1.mga6
+ Revision: 920529
- 0.3.2
- library major is now 1
- remove obsolete patch

* Wed Oct 15 2014 umeabot <umeabot> 0.2.8-3.mga5
+ Revision: 747702
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.2.8-2.mga5
+ Revision: 681296
- Mageia 5 Mass Rebuild

* Fri Dec 20 2013 luigiwalser <luigiwalser> 0.2.8-1.mga4
+ Revision: 559249
- 0.2.8

* Sat Oct 19 2013 umeabot <umeabot> 0.2.7-2.mga4
+ Revision: 527775
- Mageia 4 Mass Rebuild

* Thu Jun 13 2013 fwang <fwang> 0.2.7-1.mga4
+ Revision: 442308
- new version 0.2.7

* Sat Jan 12 2013 umeabot <umeabot> 0.2.6-5.mga3
+ Revision: 356750
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Nov 16 2012 luigiwalser <luigiwalser> 0.2.6-4.mga3
+ Revision: 318973
- fix lensfun header file installation path

* Sat Sep 08 2012 fwang <fwang> 0.2.6-3.mga3
+ Revision: 289988
- enable sse for x86_64

* Sat Sep 08 2012 fwang <fwang> 0.2.6-2.mga3
+ Revision: 289936
- more patch

* Sat Sep 08 2012 fwang <fwang> 0.2.6-1.mga3
+ Revision: 289931
- install pkgconfig file
- fix build and lib64 installation dir
- br doxygen
- specify libdir
- disable test
- build doc
- new version 0.2.6

* Sun Dec 11 2011 fwang <fwang> 0.2.5-2.mga2
+ Revision: 180798
- fix build with libpng 1.5
- add fedora patch to fix cpu features detcting

* Mon Feb 07 2011 ahmad <ahmad> 0.2.5-1.mga1
+ Revision: 48708
- imported package lensfun


* Fri Aug 06 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.2.5-1mdv2011.0
+ Revision: 567185
- update to 0.2.5
- drop patch0, not needed any more

* Wed Mar 17 2010 Oden Eriksson <oeriksson@mandriva.com> 0.2.4-2mdv2010.1
+ Revision: 523162
- rebuilt for 2010.1

* Sun Oct 18 2009 Nicolas Lécureuil <nlecureuil@mandriva.com> 0.2.4-1mdv2010.0
+ Revision: 458118
- Update to 0.2.4

* Sat Jul 11 2009 Frederic Crozat <fcrozat@mandriva.com> 0.2.3-1mdv2010.0
+ Revision: 394797
- Patch1: fix build on 64bits
- Release 0.2.3
- Patch0: fix linking

* Tue Jun 24 2008 Helio Chissini de Castro <helio@mandriva.com> 0.2.2b-1mdv2009.0
+ Revision: 228769
- Added missing buildrequires
- import lensfun