LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gts.spec of Package gts-snapshot (Project home:popinet)

%define alphatag %(date +%Y%m%d)
%define current %(pkg-config gts --modversion --silence-errors)

Summary: GNU Triangulated Surface Library (development snapshot)
Name: gts-snapshot
%if "%{current}" == ""
Version: 0.7.6
Version: %{current}
Release: 8.%{alphatag}cvs%{?dist}
License: GPLv2
%if 0%{?suse_version}
Group: Productivity/Scientific/Other
Group: Applications/Engineering
URL: http://gts.sourceforge.net
Packager: Matthieu Castellazzi <m.castellazzi@niwa.co.nz>
Source0: gts-snapshot.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%if 0%{?suse_version}
Requires: libnetpbm
BuildRequires: gtkdoc >= 1.3-4, sgml-skel, netpbm
%if 0%{?suse_version} >= 1110
BuildRequires: libnetpbm-devel
Requires: netpbm
BuildRequires: gtk-doc >= 1.3-4, netpbm-devel

# For both distros
Requires: glib2
BuildRequires: glib2-devel

%package devel
Summary: Development files for gts
%if 0%{?suse_version}
Group: Productivity/Scientific/Other
Group: Applications/Engineering
Requires: glib2-devel
Requires: %{name} = %{version}-%{release}

%package doc
Summary: Documentation for GTS (development snapshot)
%if 0%{?suse_version}
Group: Productivity/Scientific/Other
Group: Applications/Engineering
Requires: lynx

GTS includes a number of useful functions to deal with triangulated
surfaces including, but not limited to, multi-resolution models,
Delaunay and Constrained Delaunay triangulations, set operations on
surfaces (intersection, union etc ...), bounding-boxes trees for
efficient collision and intersection detection, triangle strips and
binary heaps.
%description devel
This package contains the gts header files and libs.

%description doc
This package contains the GTS Reference, in HTML format.

%setup -q -n gts-snapshot

if [ -x ./configure ]; then
    CFLAGS="$RPM_OPT_FLAGS" ./configure \
	--prefix=%{_prefix} \
	--disable-dependency-tracking \
	--libdir=%{_prefix}/%_lib \
	--mandir=%{_mandir} \
    CFLAGS="$RPM_OPT_FLAGS" sh autogen.sh \
	--prefix=%{_prefix} \
	--disable-dependency-tracking \
        --libdir=%{_prefix}/%_lib \
	--mandir=%{_mandir} \

%{__make} -C doc scan templates sgml html


# Fedora compatible changes, won't hurt SuSE
mv -f $RPM_BUILD_ROOT%{_bindir}/delaunay $RPM_BUILD_ROOT%{_bindir}/gtsdelaunay 
mv -f $RPM_BUILD_ROOT%{_bindir}/happrox $RPM_BUILD_ROOT%{_bindir}/gtshapprox
mv -f $RPM_BUILD_ROOT%{_bindir}/transform $RPM_BUILD_ROOT%{_bindir}/gtstransform

# Comply shared library policy
find $RPM_BUILD_ROOT -name *.la -exec rm -f {} \;

# Comply static build policy
find $RPM_BUILD_ROOT -name *.a -exec rm -f {} \;


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files devel

%files doc
%doc COPYING doc/html/*.html

* Tue Nov 03 2009 Matthieu Castellazzi <m.castellazzi@niwa.co.nz> - 8
- first attempt to use buildservice for gerris
- add sgml-skel and libnetpbm dependencies for the build
- add --silence-errors options to define %current

* Wed Jul 16 2008 Ivan Adam Vari <i.vari@niwa.co.nz> - 7
- Some minor changes found in debian packages

* Thu Jul 3 2008 Ivan Adam Vari <i.vari@niwa.co.nz> - 6
- Fixed typo in %files section (attr)
- Fixed typo for FC build requirement gtk-doc

* Thu May 15 2008 Ivan Adam Vari <i.vari@niwa.co.nz> - 5
- Added fedora 8 support for x86 (32bit only)
- Added doc package
- Removed libtool config files to comply with shared
  library policy
- Removed static build bits to comply with shared
  library policy
- Fixed dependencies

* Mon Jan 7 2008 Ivan Adam Vari <i.vari@niwa.co.nz> - 4
- Removed %{?_smp_mflags} from make due to intermittent
  build errors on some SMP systems

* Wed Dec 19 2007 Ivan Adam Vari <i.vari@niwa.co.nz> - 3
- Fixed creating RPM_BUILD_ROOT issue on some systems
- Fixed package (install) dependencies

* Fri Sep 28 2007 Ivan Adam Vari <i.vari@niwa.co.nz> - 2
- Added SLEx/SuSE compatibility
- Added 64bit compatibility
- Removed --disable-static flag

* Tue May 1 2007 Ivan Adam Vari <i.vari@niwa.co.nz> - 1
- Initial rpm release based on Fedora/Redhat Linux