2 # SPEC file for liboping
4 # This SPEC file is provided as a starting point for your own package of
5 # liboping. It may use distribution specific commands or tags and may not be
6 # suited for your distribution in its verbatim form. If at all possible, please
7 # use a source-RPM (SRPM) provided by your distributor.
9 # That being said, bug reports concerning this SPEC file are welcome, of
10 # course. Please report any bugs you find to liboping's mailing list at
11 # <liboping at verplant.org>. Thanks to Benjamin Petrin for providing this
17 Summary: Ping library intended for use in network monitoring applications
19 Group: System Environment/Libraries
21 URL: http://verplant.org/liboping/
22 Source0: http://verplant.org/liboping/files/liboping-%{version}.tar.gz
23 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
25 #TODO - find all build requirements using a clean system
29 The %{name} package is a C library to generate ICMP echo requests, better known
30 as “ping packets”. It is intended for use in network monitoring applications or
31 applications that would otherwise need to fork ping(1) frequently. It is like
32 ping, ping6, and fping rolled into one.
35 Summary: Development files for %{name}
36 Group: Development/Libraries
37 Requires: %{name} = %{version}-%{release}
40 The %{name}-devel package contains libraries and header files for
41 developing applications that use %{name}.
44 Summary: Perl bindings for %{name}
45 Group: Development/Libraries
46 Requires: %{name} = %{version}-%{release}
47 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
50 The %{name}-perl package contains a perl module for perl programs
59 #Install perl bindings to vendor_perl instead of site_perl
60 %configure --disable-static --with-perl-bindings='INSTALLDIRS=vendor OPTIMIZE="%{optflags}"'
61 #The application uses a local copy of libtool, we need to remove rpath with the
62 #following two lines (see https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath)
63 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
64 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
70 make install DESTDIR=%{buildroot}
71 chmod -R u+w %{buildroot}/*
72 find %{buildroot} -name '*.la' -exec rm -f {} ';'
73 find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
74 find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
75 find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
76 find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'
82 %post -p /sbin/ldconfig
84 %postun -p /sbin/ldconfig
88 %defattr(-,root,root,-)
89 %doc AUTHORS COPYING NEWS README ChangeLog
92 %{_mandir}/man8/oping.8*
96 %defattr(-,root,root,-)
99 %{_mandir}/man3/liboping.3*
100 %{_mandir}/man3/ping_construct.3*
101 %{_mandir}/man3/ping_get_error.3*
102 %{_mandir}/man3/ping_host_add.3*
103 %{_mandir}/man3/ping_iterator_get.3*
104 %{_mandir}/man3/ping_iterator_get_context.3*
105 %{_mandir}/man3/ping_iterator_get_info.3*
106 %{_mandir}/man3/ping_send.3*
107 %{_mandir}/man3/ping_setopt.3*
110 %defattr(-,root,root,-)
111 %doc bindings/perl/README bindings/perl/Changes
112 # For arch-specific packages: vendorarch
114 %exclude %dir %{perl_vendorarch}/auto/
115 %{_mandir}/man3/Net::Oping.3pm*
119 * Fri Jan 22 2010 Benjamin Petrin <b.petrin@wpi.edu> - 1.3.4-1