File: liboping.spec

package info (click to toggle)
liboping 1.10.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 716 kB
  • sloc: ansic: 3,278; perl: 210; makefile: 92; sh: 22
file content (120 lines) | stat: -rw-r--r-- 3,833 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#
# SPEC file for liboping
#
# This SPEC file is provided as a starting point for your own package of
# liboping. It may use distribution specific commands or tags and may not be
# suited for your distribution in its verbatim form. If at all possible, please
# use a source-RPM (SRPM) provided by your distributor.
#
# That being said, bug reports concerning this SPEC file are welcome, of
# course. Please report any bugs you find to liboping's mailing list at
# <liboping at verplant.org>. Thanks to Benjamin Petrin for providing this
# file.  --octo
#
Name:           liboping
Version:        1.3.4 
Release:        1%{?dist}
Summary:        Ping library intended for use in network monitoring applications

Group:          System Environment/Libraries
License:        GPLv2
URL:            http://verplant.org/liboping/
Source0:        http://verplant.org/liboping/files/liboping-%{version}.tar.gz 
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

#TODO - find all build requirements using a clean system
#BuildRequires:         

%description
The %{name} package is a C library to generate ICMP echo requests, better known 
as “ping packets”. It is intended for use in network monitoring applications or
applications that would otherwise need to fork ping(1) frequently. It is like 
ping, ping6, and fping rolled into one.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package        perl
Summary:        Perl bindings for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description    perl
The %{name}-perl package contains a perl module for perl programs
that use %{name}.


%prep
%setup -q


%build
#Install perl bindings to vendor_perl instead of site_perl
%configure --disable-static --with-perl-bindings='INSTALLDIRS=vendor OPTIMIZE="%{optflags}"'
#The application uses a local copy of libtool, we need to remove rpath with the
#following two lines (see https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath)
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
chmod -R u+w %{buildroot}/*
find %{buildroot} -name '*.la' -exec rm -f {} ';'
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'

%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README ChangeLog
%{_libdir}/*.so.*
%{_bindir}/oping
%{_mandir}/man8/oping.8*


%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%{_mandir}/man3/liboping.3*
%{_mandir}/man3/ping_construct.3*
%{_mandir}/man3/ping_get_error.3*
%{_mandir}/man3/ping_host_add.3*
%{_mandir}/man3/ping_iterator_get.3*
%{_mandir}/man3/ping_iterator_get_context.3*
%{_mandir}/man3/ping_iterator_get_info.3*
%{_mandir}/man3/ping_send.3*
%{_mandir}/man3/ping_setopt.3*

%files perl
%defattr(-,root,root,-)
%doc bindings/perl/README bindings/perl/Changes
# For arch-specific packages: vendorarch
%{perl_vendorarch}/*
%exclude %dir %{perl_vendorarch}/auto/
%{_mandir}/man3/Net::Oping.3pm*


%changelog
* Fri Jan 22 2010 Benjamin Petrin <b.petrin@wpi.edu> - 1.3.4-1
- Initial package