diff --git a/.cvsignore b/.cvsignore index e69de29..be444ef 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +gfan0.3.tar.gz diff --git a/gfan-0.3-respect-destdir.diff b/gfan-0.3-respect-destdir.diff new file mode 100644 index 0000000..49ac591 --- /dev/null +++ b/gfan-0.3-respect-destdir.diff @@ -0,0 +1,40 @@ +--- Makefile.orig 2008-12-06 20:00:35.000000000 -0800 ++++ Makefile 2008-12-06 20:02:51.000000000 -0800 +@@ -166,15 +166,15 @@ + + OBJECTS = $(CATSOBJECTS) $(APPOBJECTS) + + all: $(MAIN) + +-$(BINDIR): $(PREFIX) +- $(MKDIR) $(BINDIR) ++$(DESTDIR)$(BINDIR): $(DESTDIR)$(PREFIX) ++ $(MKDIR) $(DESTDIR)$(BINDIR) + +-$(PREFIX): +- $(MKDIR) $(PREFIX) ++$(DESTDIR)$(PREFIX): ++ $(MKDIR) -p $(DESTDIR)$(PREFIX) + + default: $(OBJECTS) $(ADDITIONALOBJECTS) $(EXECS) + + $(MAIN): $(OBJECTS) + $(CCLINKER) $(OBJECTS) $(ADDITIONALLINKOPTIONS) $(GPROFFLAG) -o $(MAIN) +@@ -262,14 +262,14 @@ + tar -c $(RELEASEDIR) > $(RELEASEDIR).tar + gzip $(RELEASEDIR).tar + + clean: + /bin/rm -f *.o $(EXECS) $(MAIN) +-install: $(BINDIR) +- cp $(EXECS) $(BINDIR) ++install: $(DESTDIR)$(BINDIR) ++ cp $(EXECS) $(DESTDIR)$(BINDIR) + # cp $(EXECS) /usr/local/bin +- ./gfan installlinks --path $(BINDIR)/ ++ ./gfan installlinks --path $(DESTDIR)$(BINDIR)/ + .c.o: + $(CC) $(CFLAGS) -c $< + .cc.o: + $(CCC) -c $< + .cpp.o: diff --git a/gfan.spec b/gfan.spec new file mode 100644 index 0000000..2a5f586 --- /dev/null +++ b/gfan.spec @@ -0,0 +1,84 @@ +Name: gfan +Version: 0.3 +Release: 3%{?dist} +Summary: Software for Computing Gröbner Fans and Tropical Varieties +Group: Applications/Engineering +License: GPL+ +URL: http://www.math.tu-berlin.de/%7Ejensen/software/gfan/gfan.html +Source0: http://www.math.tu-berlin.de/%7Ejensen/software/gfan/gfan%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# Respect DESTDIR +Patch0: gfan-0.3-respect-destdir.diff + +BuildRequires: cddlib-devel +BuildRequires: gmp-devel +BuildRequires: texlive-latex + + +%description +The software computes all marked reduced Gröbner bases of an ideal. +Their union is a universal Gröbner basis. Gfan contains algorithms for +computing this complex for general ideals and specialized algorithms +for tropical curves, tropical hypersurfaces and tropical varieties of +prime ideals. In addition to the above core functions the package +contains many tools which are useful in the study of Gröbner bases, +initial ideals and tropical geometry. Among these are an interactive +traversal program for Gröbner fans and programs for graphical renderings. + + + +%prep +%setup -q -n %{name}%{version} +# manual is non-free +rm doc/ -rf + +# Use native fedora optflags, prefix, and bindir +sed -i -e 's|^OPTFLAGS.*$||' \ + -e 's|^PREFIX.*$|PREFIX = %{_prefix}|' \ + -e 's|^BINDIR.*$|BINDIR = %{_bindir}|' Makefile + +# respect DESTDIR +%patch0 + + +%build +export OPTFLAGS="%{optflags} -DGMPRATIONAL" +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name} +mv $RPM_BUILD_ROOT%{_bindir}/gfan_* $RPM_BUILD_ROOT%{_libexecdir}/%{name}/ +pushd $RPM_BUILD_ROOT%{_libexecdir}/%{name}/ + for symlink in gfan_*; do + rm $symlink +# ln -s %{_bindir}/%{name} $symlink + ln -s ../../bin/%{name} $symlink + done +popd + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING examples LICENSE +%{_bindir}/%{name} +%{_libexecdir}/%{name} + + +%changelog +* Tue Dec 30 2008 Conrad Meyer - 0.3-3 +- Fix License tag. +- Fix build section. +- Remove doc/ in prep stage as it is non-free. + +* Fri Dec 12 2008 Conrad Meyer - 0.3-2 +- BR texlive-latex. + +* Sat Dec 6 2008 Conrad Meyer - 0.3-1 +- Initial package. diff --git a/sources b/sources index e69de29..fab26a8 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +e4b5abe3714930b1789752fe79026b9d gfan0.3.tar.gz