LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libss7.spec of Package libss7 (Project home:crt0solutions:asterisk)

###################################################################
#
#  libss7.spec - used to generate libss7 rpm
#  For more info: http://www.rpm.org/max-rpm/ch-rpm-basics.html
#
#  This spec file uses default directories:
#  /usr/src/redhat/SOURCES - orig source, patches, icons, etc.
#  /usr/src/redhat/SPECS - spec files
#  /usr/src/redhat/BUILD - sources unpacked & built here
#  /usr/src/redhat/RPMS - binary package files
#  /usr/src/redhat/SRPMS - source package files
#
###################################################################
#
#  Global Definitions
#
###################################################################
%define aversion 1.0.2
%define arelease 1_centos5
%define actversion %(echo %{aversion}|sed -e "s/-.*$//g")
%define subvers %(echo %{aversion}|awk "/-/"|sed -e "s/^.*-//"|awk '{print "0." $1 "."}')
%define actrelease %(echo %{subvers}%{arelease}|sed -e "s/-/_/g")

#Workaround for 64 bit CPUs
%define _lib lib

###################################################################
#
#  The Preamble
#  information that is displayed when users request info
#
###################################################################
Summary: Libss7, an open source implementation of Signalling System 7 (SS7)
Name: libss7
Version: %{actversion}
Release: %{actrelease}
License: GPL
Group: Utilities/System
Source: %{name}-sources-%{aversion}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL: http://www.asterisk.org
Vendor: Digium, Inc.
Packager: Jason Parker <jparker@digium.com>
#
# Other tags not used
#
#Distribution:
#Icon:
#Provides:
#Conflicts:
#Serial:
#Requires:
#AutoReqProv:
#ExcludeArch:

%description
libss7 is a C implementation of the Signalling System 7 (SS7) specification.  

%package devel
Summary: Libss7 libraries and header files for libss7 development
Group: Development/Libraries
Requires: %{name} = %{actversion}-%{release}

%description devel
The static libraries and header files needed for building additional plugins/modules

###################################################################
#
#  The Prep Section
#  If stuff needs to be done before building, this is the section
#  Use shell scripts to do stuff like uncompress and cd into source dir 
#  %setup macro - cleans old build trees, uncompress and extracts original source 
#
###################################################################
%prep
%setup -n %{name}-%{aversion}

###################################################################
#
#  The Build Section
#  Use shell scripts and do stuff that makes the build happen, i.e. make
#
###################################################################
%build
echo %{aversion} > .version
make 2> err
mv err %{name}-sources-%{version}-%{release}.make.err
mv %{name}-sources-%{version}-%{release}.make.err /var/log

###################################################################
#
#  The Install Section
#  Use shell scripts and perform the install, like 'make install', 
#  but can also be shell commands, i.e. cp, mv, install, etc.. 
#
###################################################################
%install
make DESTDIR=$RPM_BUILD_ROOT install

###################################################################
#
#  Install and Uninstall 
#  This section can have scripts that are run either before/after
#  an install process, or before/after an uninstall process
#  %pre - executes prior to the installation of a package
#  %post - executes after the package is installed
#  %preun - executes prior to the uninstallation of a package
#  %postun - executes after the uninstallation of a package
#
###################################################################
%post
ldconfig

###################################################################
#
#  Verify
#
###################################################################
%verifyscript

###################################################################
#
#  Clean
#
###################################################################
%clean
cd $RPM_BUILD_DIR
%{__rm} -rf %{name}-%{version} 
%{__rm} -rf /var/log/%{name}-sources-%{version}-%{release}.make.err
%{__rm} -rf $RPM_BUILD_ROOT

###################################################################
#
#  File List
#
###################################################################
%files
#
#  Documents
#
#%doc README
#%doc LICENSE
#
#  Module List
#
%defattr(-, root, root)
%{_libdir}/libss7.so
%{_libdir}/libss7.so.1
%{_libdir}/libss7.so.1.0

%files devel
#
#  Header Files
#
%defattr(-, root, root)
%{_includedir}/libss7.h
%{_libdir}/libss7.a