Summary:       library for generating Enhanced Metafiles
Summary(ja):   EMF作成ライブラリ
Name:          libemf
Version:       1.0.7
Release:       2%{?_dist_release}
Group:         System Environment/Libraries
License:       LGPL
Source:        libEMF-%{version}.tar.gz
URL:           http://libemf.sourceforge.net/
BuildRoot:     %{_tmppath}/%{name}-%{version}-root
Vendor:        Project Vine
Distribution:  Vine Linux
Packager:      Susumu Tanimura <stanimura-ngs@umin.ac.jp>

%description
libEMF is a library for generating Enhanced Metafiles on systems which
do not natively support the ECMA-234 Graphics Device Interface
(GDI). The library is intended to be used as a driver for other
graphics programs such as Grace or gnuplot. Therefore, it implements a
very limited subset of the GDI.

%description -l ja
libEMFはECMA-234グラフィックディバイスインターフェイス(GDI)をサポート
していないシステムのためのemf作成ライブラリです。このライブラリは、 
Grace や gnuplotなど他のグラフィックソフトから利用するようになっており、
GDIサブセットしては機能的制約があります。

%package -n %{name}-devel
Summary:     Development files for using the EMF library
Summary(ja): EMFライブラリ開発キット
Group:       Development/Libraries
Requires:    libemf = %{version}-%{release}

%description -n %{name}-devel
Development files for using the EMF library

%description  -n %{name}-devel -l ja
EMFライブラリ開発キット

%prep
%setup -q -n libEMF-%{version}

%build
# --enable-static=no, --disable-static does not work... 
%configure --disable-static --enable-editing
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README AUTHORS COPYING.LIB COPYING NEWS 
%{_libdir}/libEMF.so*
%{_bindir}/printemf

%files -n %{name}-devel
%defattr(-,root,root,-)
%doc doc/html/*
%{_libdir}/libEMF.so
%{_includedir}/libEMF/*.h
%{_includedir}/libEMF/wine/*.h
%exclude %{_libdir}/libEMF.a
%exclude %{_libdir}/libEMF.la

%changelog
* Sun Jul 10 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-2
- rebuild with gcc-5.4.0

* Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-1
- update to 1.0.7
- remove old patches

* Thu Apr 29 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.4-1
- updated libEMF to 1.0.4
- built with new toolchain

* Sun Jun 14 2009 Shu KONNO <owa@bg.wakwak.com> 1.0.3-1
- updated libEMF to 1.0.3
- added libEMF-1.0.3-amd64.patch (from fedora)
- dropt *.a *.la
- dropt patch-include+wine+winnt.h
- dropt patch-libemf+libemf.cpp
- dropt patch-libemf+libemf.h

* Mon Sep 22 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-1
- applied new versioning policy
- spec in UTF-8

* Sun May 20 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-0vl6
- rebuilt with new toolchain

* Thu Aug 17 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0-0vl5
- rebuilt for VineSeed (4.0)
- added %post, %postun section

* Wed Oct 20 2004 Susumu Tanimura  <stanimura-ngs@umin.ac.jp>
- Moved html documents to the devel package

* Wed Sep 22 2004 Susumu Tanimura  <stanimura-ngs@umin.ac.jp>
- Change the name to libemf 
- Divided libemf and devel
- Took the patch written by Wirawan Purwanto
- Took the patch from FreeBSD

* Thu Oct  2 2003  Susumu Tanimura  <stanimura-ngs@umin.ac.jp>
- initial package