summaryrefslogtreecommitdiff
path: root/wmnet.spec
blob: 2c46330509c8537a78c9ef284c36eb1ad7a3b4c4 (plain)
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
%define name wmnet
%define version 1.04
%define release 1

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

Summary: Applet that monitors the network
Summary(fr): Applette qui surveille le réseau

Name: %{name}
Version: %{version}
Release: %{release}
Group: X11/Utilities
Copyright: GPL
Packager: Jesse B. Off <joff@iastate.edu>
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.wmconfig
BuildRoot:	/tmp/%{name}-%{version}-root
Icon: %{name}.gif
Exclusiveos: Linux

%changelog


%description 
Wmnet uses ip accounting in the Linux kernel
to monitor your network.

%description -l fr
Wmnet utilise "l'ip accounting" dans le kernel
de Linux pour surveiller le réseau.

%prep

%setup

%build
xmkmf
make CFLAGS="$RPM_OPT_FLAGS"

%install
if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT ; fi
mkdir -p $RPM_BUILD_ROOT/usr/X11R6/bin $RPM_BUILD_ROOT/etc/X11/wmconfig $RPM_BUILD_ROOT/usr/X11R6/man/man1
strip %{builddir}/wmnet
cp %{builddir}/wmnet $RPM_BUILD_ROOT/usr/X11R6/bin
cp %{builddir}/wmnet.man $RPM_BUILD_ROOT/usr/X11R6/man/man1/wmnet.1x
cp $RPM_SOURCE_DIR/%{name}.wmconfig $RPM_BUILD_ROOT/etc/X11/wmconfig/%{name}

%files
%doc TODO README Changelog
%attr(644,root,root) %config(missingok) /etc/X11/wmconfig/wmnet
%attr(755,root,root) /usr/X11R6/bin/wmnet
%attr(644,root,root) /usr/X11R6/man/man1/wmnet.1x

%clean
rm -r $RPM_BUILD_ROOT
rm -r %{builddir}

%post
if [ ! -e /proc/net/ip_acct ]; then
	echo "You must have IP accounting enabled in your kernel !"
fi