File unibilium.spec of Package unibilium

#
# spec file for package unibilium
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define sover 0
Name:           unibilium
Version:        1.2.0
Release:        0
Summary:        A terminfo parsing library
License:        LGPL-3.0+
Group:          System/Libraries
Url:            https://github.com/mauke/unibilium/
Source:         https://github.com/mauke/unibilium/archive/v%{version}/unibilium-%{version}.tar.gz
BuildRequires:  libtool
BuildRequires:  pkg-config

%description
Unibilium is a very basic terminfo library. It doesn't depend on curses or any
other library. It also doesn't use global variables, so it should be
thread-safe.

%package -n lib%{name}%{sover}
Summary:        A terminfo parsing library - Shared library package
Group:          System/Libraries

%description -n lib%{name}%{sover}
Unibilium is a very basic terminfo library. It doesn't depend on curses or any
other library. It also doesn't use global variables, so it should be
thread-safe.

This package holds the shared library.

%package devel
Summary:        A terminfo parsing library - Development files
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{sover} = %{version}

%description devel
Unibilium is a very basic terminfo library. It doesn't depend on curses or any
other library. It also doesn't use global variables, so it should be
thread-safe.

This package holds the development files.

%prep
%setup -q

%build
make CFLAGS="%{optflags}" \
     PREFIX="%{_prefix}" \
     LIBDIR="%{_libdir}" \
     %{?_smp_mflags}

%install
make CFLAGS="%{optflags}" \
     PREFIX="%{_prefix}" \
     LIBDIR="%{_libdir}" \
     DESTDIR=%{buildroot} \
     install

# Remove libtool files.
find %{buildroot} -type f -name "*.la" -delete -print

# Remove static library file.
rm -vf %{buildroot}%{_libdir}/lib%{name}.a

%post   -n lib%{name}%{sover} -p /sbin/ldconfig

%postun -n lib%{name}%{sover} -p /sbin/ldconfig

%files -n lib%{name}%{sover}
%defattr(-,root,root)
%doc GPLv3 LGPLv3 LICENSE README
%{_libdir}/lib%{name}.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}.h
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/unibi*.3*

%changelog
openSUSE Build Service is sponsored by