diff --git a/.cvsignore b/.cvsignore index e69de29..e896552 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +figtoipe-20080505.tar.gz diff --git a/figtoipe.spec b/figtoipe.spec new file mode 100644 index 0000000..3738b71 --- /dev/null +++ b/figtoipe.spec @@ -0,0 +1,75 @@ +Name: figtoipe +Version: 20080505 +Release: 2%{?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://luaforge.net/frs/download.php/3343/figtoipe-%{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 +* Mon May 19 2008 Laurent Rineau - 20080505-2 +- Do not compress man pages during builds (done by rpm). + +* Sat May 17 2008 Laurent Rineau - 20080505-1 +- New upstream release. + +* Fri May 16 2008 Laurent Rineau - 20071004-5 +- Add a copy of the figtoipe.cpp header in license.txt + +* Fri Feb 15 2008 Laurent Rineau - 20071004-4 +- Add a license file. +- Fix the BR: zlib-devel + +* Thu Feb 14 2008 Laurent Rineau - 20071004-3 +- Extract the changelog from figtoipe.cpp + +* Thu Feb 14 2008 Laurent Rineau - 20071004-2 +- Add the man page. + +* Tue Feb 12 2008 Laurent Rineau - 20071004-1 +- Initial build for Fedora. + diff --git a/sources b/sources index e69de29..89a5dba 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +243c5c225d647a5076118597ec0699e6 figtoipe-20080505.tar.gz