File: libnet.spec

package info (click to toggle)
libnet 1.0.2a-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,672 kB
  • ctags: 840
  • sloc: ansic: 9,061; sh: 3,607; makefile: 413
file content (52 lines) | stat: -rw-r--r-- 1,455 bytes parent folder | download | duplicates (2)
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
%define name libnet
%define dirname Libnet
%define version 1.0.2
%define release 1
%define prefix /usr

%define builddir $RPM_BUILD_DIR/%{dirname}-%{version}

Summary: Routines to help with network packet contruction and handling
Name: %{name}
Version: %{version}
Release: %{release}
Prefix: %{prefix}
Copyright: BSD
Vendor: Mike D. Schiffman <mike@infonexus.com>
Packager: Troy Engel <tengel@sonic.net>
Group: Development/Libraries
Source: %{name}-%{version}.tgz
URL: http://www.packetfactory.com/libnet
BuildRoot: /tmp/%{name}-%{version}-root

%description
Libnet is a collection of routines to help with the construction and
handling of network packets. It provides a portable framework for low-
level network packet writing and handling.

%prep
rm -rf %{builddir}

%setup -n %{dirname}-%{version}
touch `find . -type f`

%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

cd $RPM_BUILD_ROOT
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name}
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{builddir}
rm -f $RPM_BUILD_DIR/file.list.%{name}

%files -f ../file.list.%{name}
%doc doc/CHANGELOG* doc/CONTRIB doc/COPYING doc/PORTS doc/README* doc/TODO