Bump version to 1.10.0; Update ChangeLog.
[liboping.git] / contrib / liboping.spec
1 #
2 # SPEC file for liboping
3 #
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.
8 #
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
12 # file.  --octo
13 #
14 Name:           liboping
15 Version:        1.3.4 
16 Release:        1%{?dist}
17 Summary:        Ping library intended for use in network monitoring applications
18
19 Group:          System Environment/Libraries
20 License:        GPLv2
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)
24
25 #TODO - find all build requirements using a clean system
26 #BuildRequires:         
27
28 %description
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.
33
34 %package        devel
35 Summary:        Development files for %{name}
36 Group:          Development/Libraries
37 Requires:       %{name} = %{version}-%{release}
38
39 %description    devel
40 The %{name}-devel package contains libraries and header files for
41 developing applications that use %{name}.
42
43 %package        perl
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))
48
49 %description    perl
50 The %{name}-perl package contains a perl module for perl programs
51 that use %{name}.
52
53
54 %prep
55 %setup -q
56
57
58 %build
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
65 make %{?_smp_mflags}
66
67
68 %install
69 rm -rf %{buildroot}
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 {} ';'
77
78 %clean
79 rm -rf %{buildroot}
80
81
82 %post -p /sbin/ldconfig
83
84 %postun -p /sbin/ldconfig
85
86
87 %files
88 %defattr(-,root,root,-)
89 %doc AUTHORS COPYING NEWS README ChangeLog
90 %{_libdir}/*.so.*
91 %{_bindir}/oping
92 %{_mandir}/man8/oping.8*
93
94
95 %files devel
96 %defattr(-,root,root,-)
97 %{_includedir}/*
98 %{_libdir}/*.so
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*
108
109 %files perl
110 %defattr(-,root,root,-)
111 %doc bindings/perl/README bindings/perl/Changes
112 # For arch-specific packages: vendorarch
113 %{perl_vendorarch}/*
114 %exclude %dir %{perl_vendorarch}/auto/
115 %{_mandir}/man3/Net::Oping.3pm*
116
117
118 %changelog
119 * Fri Jan 22 2010 Benjamin Petrin <b.petrin@wpi.edu> - 1.3.4-1
120 - Initial package