libgts/libgts.spec

125 lines
3.6 KiB
RPMSpec

%define majver %(echo %version | cut -d. -f 1-2)
Name: libgts
Version: 0.7.6
Release: 2mamba
Summary: The GNU Triangulated Surface Library
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://gts.sourceforge.net/index.html
Source: http://downloads.sourceforge.net/project/gts/gts/%{version}/gts-%{version}.tar.gz
Patch0: libgts-0.7.6-hacks.diff
Patch1: gts-0.7.6-autotools.diff.bz2
Patch2: libgts-0.7.6-netpbm.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libglib-devel
BuildRequires: libnetpbm-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This is the GTS library. GTS stands for the GNU Triangulated Surface Library.
It 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 generation for fast rendering.
%package devel
Group: Development/Libraries
Summary: Libraries and headers for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
The GNU Triangulated Surface Library.
This package contains libraries and header files need for development.
%package static
Group: Development/Libraries
Summary: Static libraries for %{name}
Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release}
%description static
The GNU Triangulated Surface Library.
This package contains static libraries need for development.
%package -n gts
Group: Applications/Graphics
Summary: GNU Triangulated Surface Library
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n gts
GTS provides a set of useful functions to deal with 3D surfaces meshed with interconnected triangles including collision detection, multiresolution models, constrained Delaunay triangulations and robust set operations (union, intersection, differences).
%prep
%setup -q -n gts-%{version}
#%patch0 -p1
#%patch1 -p1
%patch2 -p1
chmod +x test/*/*.sh
%build
autoreconf -fi
%configure \
--disable-dependency-tracking \
LIBS=-lm
# --disable-static \
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
mv -f %{buildroot}%{_bindir}/delaunay %{buildroot}%{_bindir}/gtsdelaunay
mv -f %{buildroot}%{_bindir}/happrox %{buildroot}%{_bindir}/gtshapprox
mv -f %{buildroot}%{_bindir}/transform %{buildroot}%{_bindir}/gtstransform
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%check
make check ||:
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libgts-%{majver}.so.*
%doc AUTHORS COPYING
%files devel
%defattr(-,root,root)
%{_datadir}/aclocal/gts.m4
%{_includedir}/gts*.h
%{_libdir}/libgts.so
%{_libdir}/pkgconfig/gts.pc
%doc ChangeLog NEWS README THANKS TODO
%files -n gts
%defattr(-,root,root)
%{_bindir}/gts-config
%{_bindir}/gts2dxf
%{_bindir}/gts2oogl
%{_bindir}/gts2stl
%{_bindir}/gtscheck
%{_bindir}/gtscompare
%{_bindir}/gtsdelaunay
%{_bindir}/gtshapprox
%{_bindir}/gtstemplate
%{_bindir}/gtstransform
%{_bindir}/stl2gts
%files static
%defattr(-,root,root)
%{_libdir}/libgts.*a
%changelog
* Thu Jul 18 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.6-2mamba
- rebuilt in devel
* Thu Jun 24 2010 gil <puntogil@libero.it> 0.7.6-1mamba
- package created by autospec