File libpdcom1.spec of Package PdCom
#----------------------------------------------------------------------------
#
# $Id$
#
# Copyright (C) 2012-2017 Richard Hacker <lerich@gmx.net>
# Florian Pose <fp@igh.de>
#
# This file is part of the PdCom library.
#
# The PdCom library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# The PdCom library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with the PdCom Library. If not, see <http://www.gnu.org/licenses/>.
#
# vim: tw=78
#
#----------------------------------------------------------------------------
Name: libpdcom1
Version: 3.0.9
Release: 0
License: LGPL-3.0+
Vendor: Ingenieurgemeinschaft IgH GmbH
URL: http://etherlab.org/en/pdcom
Source0: http://etherlab.org/download/pdcom/pdcom-%{version}.tar.bz2
BuildRoot: /tmp/%{name}-%{version}
BuildRequires: gcc-c++ autoconf automake libtool
%if 0%{?suse_version}
BuildRequires: libexpat-devel
%else
# Fedora
BuildRequires: expat-devel
BuildRequires: glibc-all-langpacks
BuildRequires: redhat-rpm-config
%undefine _hardened_build
%endif
#----------------------------------------------------------------------------
# Main Package
#----------------------------------------------------------------------------
Summary: Process data communication library
Group: EtherLab
%description
PdCom shall provide a flexible C++ API for non-realtime exchange of process
data and is part of the EtherLab project (http://etherlab.org/en/pdcom). It is
designed to be independent of any communication protocols and channels, and
shall be usable under several operating systems and platforms. I. e. it has
been tested successfully under Linux and Windows.
#----------------------------------------------------------------------------
# Development package
#----------------------------------------------------------------------------
%package devel
Summary: Development files for PdCom
Group: Development/Libraries/C and C++
%if 0%{?suse_version}
Requires: %{name} = %{version} libexpat-devel
%else
# Fedora
Requires: %{name} = %{version} expat-devel
%endif
%description devel
PdCom shall provide a flexible C++ API for non-realtime exchange of process
data and is part of the EtherLab project (http://etherlab.org/en/pdcom). It is
designed to be independent of any communication protocols and channels, and
shall be usable under several operating systems and platforms. I. e. it has
been tested successfully under Linux and Windows.
#----------------------------------------------------------------------------
%prep
%setup -n pdcom-%{version}
%build
./bootstrap.sh
# RPM_OPT_FLAGS is needed on Fedora to produce valid debug packages
export CXXFLAGS="${RPM_OPT_FLAGS} -Wno-deprecated"
%configure --disable-static
make %{?_smp_mflags}
%install
make DESTDIR=${RPM_BUILD_ROOT} install
rm $RPM_BUILD_ROOT%{_libdir}/libpdcom.la
%clean
rm -rf ${RPM_BUILD_ROOT}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libpdcom.so.*
%files devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS
%{_includedir}/*.h
%{_includedir}/pdcom
%{_libdir}/libpdcom.so
#----------------------------------------------------------------------------
%changelog
* Wed Jan 8 2014 fp@igh.de
- Updated for use with OBS
#----------------------------------------------------------------------------