File admesh.spec of Package admesh

Name:           admesh
Version:        0.98.1
Release:        1%{?dist}
Summary:        Diagnose and/or repair problems with STereo Lithography files
License:        GPLv2+
Group:          Applications/Engineering
URL:            http://github.com/admesh/admesh/
Source0:        http://github.com/admesh/admesh/releases/download/v%{version}/admesh-%{version}.tar.gz
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}

%description
ADMesh is a program for diagnosing and/or repairing commonly encountered
problems with STL (STereo Lithography) data files. It can remove degenerate
and unconnected facets, connect nearby facets, fill holes by adding facets,
and repair facet normals. Simple transformations such as scaling,
translation and rotation are also supported. ADMesh can read both
ASCII and binary format STL files, while the output can be in
AutoCAD DXF, Geomview OFF, STL, or VRML format.

%package devel
Summary:        Development files for the %{name} library
Group:          Development/Libraries
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}

%description devel
ADMesh is a program for diagnosing and/or repairing commonly encountered
problems with STL (STereo Lithography) data files.

This package contains the development files needed for building new
applications that utilize the %{name} library.

%package libs
Summary:        Runtime library for the %{name} application
Group:          Development/Libraries

%description libs
This package contains the %{name} runtime library.

%prep
%setup -q

%build
%configure
# Pass the -v option to libtool so we can better see what's going on
make %{?_smp_mflags} CFLAGS="%{optflags}" LIBTOOLFLAGS="-v"

%install
%{make_install}
# Remove the documentation installed by "make install" (rpm will handle that)
rm -rf %{buildroot}%{_defaultdocdir}/%{name}
# Remove the libtool archive installed by "make install"
rm -f %{buildroot}%{_libdir}/lib%{name}.la

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%files
%doc ChangeLog ChangeLog.old COPYING README.md AUTHORS
%doc %{name}-doc.txt block.stl
%{_bindir}/%{name}
%{_mandir}/man1/*

%files devel
%{_includedir}/*
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/*

%files libs
%doc COPYING AUTHORS
%{_libdir}/lib%{name}.so.*