Name:           libpgf
Version:        6.14.12
Release:        1%{?_dist_release}
Summary:        PGF (Progressive Graphics File) library

Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://www.libpgf.org
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-src-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  doxygen
BuildRequires:  libtool

%description
libPGF contains an implementation of the Progressive Graphics File (PGF)
which is a new image file format, that is based on a discrete, fast
wavelet transform with progressive coding features. PGF can be used
for lossless and lossy compression.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q -n %{name}

chmod o-x COPYING README

mv configure.ac configure.ac.crlf
tr -d "
" < configure.ac.crlf > configure.ac

#sed -i 's|$(DESTDIR)$(datadir)/doc/$(DOC_MODULE)|$(RPM_BUILD_DIR)/libpgf|g' doc/Makefile.am

%build
sh autogen.sh
export CFLAGS="%{optflags} -DLIBPGF_DISABLE_OPENMP"
export CXXFLAGS="%{optflags} -DLIBPGF_DISABLE_OPENMP"
%configure --disable-static
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%doc COPYING README
%{_libdir}/libpgf.so.6*

%files devel
%doc doc/html
%{_includedir}/%{name}
%{_libdir}/libpgf.so
%{_libdir}/pkgconfig/libpgf.pc
%{_mandir}/man3/*


%changelog
* Sun Feb  8 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 6.14.12-1
- Initial build for Vine Linux

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.13.45-0.3.svn123
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.13.45-0.2.svn123
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon Nov 11 2013 Alexey Kurov <nucleo@fedoraproject.org> - 6.13.45-0.1.svn123
- libpgf-6.13.45 r123 snapshot

* Fri Oct 25 2013 Alexey Kurov <nucleo@fedoraproject.org> - 6.12.27-0.2.svn119
- disable OpenMP

* Fri Oct 25 2013 Alexey Kurov <nucleo@fedoraproject.org> - 6.12.27-0.1.svn119
- libpgf-6.12.27 r119 snapshot

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.12.24-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.12.24-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.12.24-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Jun 26 2012 Alexey Kurov <nucleo@fedoraproject.org> - 6.12.24-2
- libpgf-6.12.24

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.11.42-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Oct 28 2010 Alexey Kurov <nucleo@fedoraproject.org> - 6.11.42-1
- libpgf-6.11.42

* Thu Sep 23 2010 Alexey Kurov <nucleo@fedoraproject.org> - 6.11.24-1
- Initial RPM release
- added svn r46-48 fixes (6.11.32)
- install docs in -devel
