Name: libexif
Summary: EXIF tag library
Summary(ja): EXIF タグライブラリ
Version: 0.6.22
Release: 2%{?_dist_release}
Group: System Environment/Libraries
Vendor: Project Vine
Distribution: Vine Linux

License: LGPLv2+
URL: https://libexif.github.io/
%define altver %(echo %{version} | tr . _)
Source: https://github.com/libexif/libexif/releases/download/libexif-%{altver}-release/%{name}-%{version}.tar.xz
Patch1000: CVE-2020-0198.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pkgconfig gettext doxygen

%description
libexif is a library for parsing, editing, and saving EXIF data. It is
intended to replace lots of redundant implementations in command-line
utilities and programs with GUIs.

%package devel
Summary: The files needed for libexif application development
Group: Development/Libraries
Requires: %{name} = %{version}

%description devel
The libexif-devel package contains the libraries and include files
that you can use to develop libexif applications.


%prep
%setup -q
%autopatch -p1

%build
autoreconf -fiv
%configure --disable-static
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install

rm -rf installed-docs
cp -pr %{buildroot}%{_datadir}/doc/%{name} installed-docs
rm -rf %{buildroot}%{_datadir}/doc/%{name}

rm -f %{buildroot}%{_libdir}/*.la


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%license COPYING
%doc ABOUT-NLS AUTHORS ChangeLog NEWS README
%{_libdir}/libexif.so.*
%{_datadir}/locale/*/LC_MESSAGES/*.mo

%files devel
%defattr(-,root,root)
%license COPYING
%doc installed-docs/libexif-api.html
%{_libdir}/libexif.so
%{_libdir}/pkgconfig/libexif.pc
%{_includedir}/libexif
#{_libdir}/libexif.la
#{_libdir}/libexif.a


%changelog
* Tue Jun 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6.22-2
- added Patch1000 to fix CVE-2020-0198.

* Fri May 22 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6.22-1
- new upstream release.
- dropped Patch0-4: fixed in upstream.

* Sun May 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6.21-3
- added Patch0-4 to fix CVE-2016-6328, CVE-2018-20030 and CVE-2020-12767.

* Sat Jan  4 2014 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.6.21-2
- rebuilt with new vineseed toolchan

* Thu Sep 20 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.6.21-1
- new upstream release with security fixes
  (CVE-2012-2812, 2813, 2814, 2836, 2837, 2840, 2841, 2845)

* Wed Mar 21 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.6.20-1
- new upstream release (stability/bug fix release)

* Tue Sep 21 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.19-1
- new upstream release with security fix (CVE-2009-3895)
- built with rpm-4.8.1 for pkg-config

* Mon Oct 19 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.18-1
- new upstream release
- removed static library from devel package

* Sat Mar 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.17-1
- new upstream release
- dropped Patch0, 1 (merged into upstream)

* Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.16-1vl5
- applied new versioning policy
- removed *.la files from devel package

* Fri Dec 21 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.16-0vl2
- Add Patch0 for CVE-2007-6351
- Add Patch1 for CVE-2007-6352
- change License to LGPL
- update %%doc

* Thu Jun 14 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.6.16-0vl1
- new upstream release with security fix

* Mon May 14 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.14-0vl1
- new upstream release

* Thu Feb 16 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.6.13-0vl1
- new upstream release
- add BuildRequires: doxygen
- add %%doc to devel package

* Sat Mar 19 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.12-0vl2
- rebuild for VineSeed

* Tue Mar 15 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.12-0vl1
- new upstream release (includes security fix for CAN-2005-0664)
- remove patch0

* Sat Feb 26 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.11-0vl2
- rebuild for VineSeed

* Sat Feb 26 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.11-0vl1
- new upstream release
- add Patch0

* Wed Sep 29 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.6.10-0vl1
- first release
