File libpdel.spec of Package libpdel

# $Id$

#
# Copyright (C) 2011 Archie L. Cobbs.
# 
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# 

Name:           libpdel
Version:        0.6.1
Release:        1
License:        BSD
Summary:        An assorted collection of code useful for developing embedded applications
Group:          Development/Libraries/C and C++
Source:         http://sourceforge.net/projects/libpdel/files/libpdel-combined/0.6.1/libpdel-0.6.1.tar.bz2
Patch0:         install.patch
URL:            https://sourceforge.net/projects/libpdel/
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
%if 0%{?suse_version} >= 1100
BuildRequires:  libopenssl-devel
%else
BuildRequires:  openssl-devel
%endif
%if 0%{?suse_version} < 1000 || 0%{?fedora_version} != 0 || 0%{?centos_version} != 0
BuildRequires:  expat
%else
BuildRequires:  libexpat-devel
%endif

%description
The Packet Design Embedded Library (PDEL) is a C library containing an
assorted collection of code useful for developing embedded applications.

%prep
%setup -q
%patch0 -p2

%build
export SUSE_ASNEEDED=0
cd pdel/
make

%clean
rm -rf ${RPM_BUILD_ROOT}

%install
rm -rf ${RPM_BUILD_ROOT}
cd pdel/
make install DESTDIR=${RPM_BUILD_ROOT} prefix=%{_usr} mandir=%{_mandir} libdir=%{_libdir} slibdir=%{_libdir}

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%attr(0644,root,root) %{_libdir}/*
%attr(0644,root,root) %doc %{_mandir}/man3/*

%package devel
Summary:        Include Files and Libraries mandatory for %{name} Development
Group:          Development/Libraries/C and C++
Requires:       libpdel = %{version}

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require %{name}.

%files devel
%attr(-,root,root) %{_includedir}/*

%changelog
openSUSE Build Service is sponsored by