Blob Blame History Raw
Name:           figtoipe
Version:        20091205
Release:        5%{?dist}
Summary:        FIG to IPE conversion tool

Group:          Applications/Publishing       
#
# GPLv2, with an exception for the CGAL libraries.
License:        GPLv2+ with exceptions
#
URL:            http://tclab.kaist.ac.kr/ipe/
Source0:        http://downloads.sourceforge.net/ipe7/tools/%{name}-%{version}.tar.gz
Source1:        http://www.gnu.org/licenses/gpl-2.0.txt
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  zlib-devel, perl

%description
Figtoipe is a program that reads FIG files (as generated by
xfig) and generates an XML file readable by the Ipe editor.

%prep
%setup -q
sed -i -e 's/\r//' README figtoipe.cpp
chmod a-x README figtoipe.cpp

# extract the changelog from figtoipe.cpp
perl -ne 'if(m|\* Changes| .. m|\*/|) { m| \* (.*)| && print "$1\n";}' < figtoipe.cpp > CHANGES
# extract the license terms from figtoipe.cpp
perl -ne 'if(m|This file| .. m| USA.$|) { print;}' < figtoipe.cpp > LICENSE

cp %{SOURCE1} .

%build
%{__cxx} %{optflags} -o figtoipe figtoipe.cpp -lz

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 figtoipe $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 figtoipe.1 $RPM_BUILD_ROOT%{_mandir}/man1

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README CHANGES gpl-2.0.txt LICENSE
%{_bindir}/figtoipe
%{_mandir}/man1/figtoipe.1.gz

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

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

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091205-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jan 13 2010  <Laurent.Rineau__fedora@normalesup.org> - 20091205-2
- Fix URL, following rules from https://fedoraproject.org/wiki/Packaging:SourceURL#Sourceforge.net

* Sun Jan 10 2010  <Laurent.Rineau__fedora@normalesup.org> - 20091205-1
- New upstream release
- Change the URL of Source0

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20080505-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20080505-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon May 19 2008 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 20080505-2
- Do not compress man pages during builds (done by rpm).

* Sat May 17 2008 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 20080505-1
- New upstream release.

* Fri May 16 2008 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 20071004-5
- Add a copy of the figtoipe.cpp header in license.txt

* Fri Feb 15 2008 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 20071004-4
- Add a license file.
- Fix the BR: zlib-devel

* Thu Feb 14 2008 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 20071004-3
- Extract the changelog from figtoipe.cpp

* Thu Feb 14 2008 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 20071004-2
- Add the man page.

* Tue Feb 12 2008 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 20071004-1
- Initial build for Fedora.