]> git.pld-linux.org Git - SPECS.git/blob - niceshaper.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / niceshaper.spec
1
2 %define         _rc     rc8
3
4 Summary:        NiceShaper - bandwidth limiting
5 Summary(pl.UTF-8):      NiceShaper - dynamiczny podział łącza
6 Name:           niceshaper
7 Version:        0.6
8 Release:        0.%{_rc}.1
9 License:        GPL
10 Group:          Networking/Admin
11 Source0:        http://niceshaper.jedwabny.net/files/%{name}%{version}%{_rc}.tar.bz2
12 # Source0-md5:  32aab12fe08aa77c4244c9c3db1c082b
13 Source1:        %{name}.users
14 Source2:        %{name}.config
15 Source3:        %{name}.about
16 Source4:        %{name}.init
17 Patch0:         %{name}-includes.patch
18 Patch1:         %{name}-iptables-deprecated.patch
19 URL:            http://niceshaper.jedwabny.net/
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  rpmbuild(macros) >= 1.268
22 Requires(post,preun):   /sbin/chkconfig
23 Requires:       firewall-userspace-tool
24 Requires:       rc-scripts
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 This program limits bandwidth on the ethernet/ppp interface and
29 divides it between the hosts in the local network.
30
31 %description -l pl.UTF-8
32 Program opierając się na HTB/IMQ dzieli dostępne pasmo na komputery w
33 sieci, dynamicznie dostosowując się do generowanego przez każdego z
34 użytkowników obciążenia.
35
36 %prep
37 %setup -q -c
38 %patch0 -p1
39 %patch1 -p1
40
41 %build
42
43 %{__make} \
44         CPP="%{__cxx} %{rpmcxxflags}"
45
46 install %{SOURCE1} ./users
47 install %{SOURCE2} ./config
48 install %{SOURCE3} ./about
49 install %{SOURCE4} .
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53
54 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/niceshaper0.6,/etc/rc.d/init.d}
55
56 install niceshaper $RPM_BUILD_ROOT%{_bindir}
57 install etc/niceshaper0.6/* $RPM_BUILD_ROOT%{_sysconfdir}/niceshaper0.6
58 install niceshaper.init $RPM_BUILD_ROOT/etc/rc.d/init.d/niceshaper
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %post
64 /sbin/chkconfig --add niceshaper
65 %service niceshaper restart "niceshaper daemon"
66
67 %preun
68 if [ "$1" = "0" ]; then
69         %service niceshaper stop
70         /sbin/chkconfig --del niceshaper
71 fi
72
73 %files
74 %defattr(644,root,root,755)
75 %doc users config about
76 %dir %{_sysconfdir}/%{name}0.6
77 %attr(640,root,root) %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}0.6/*
78 %attr(755,root,root) %{_bindir}/*
79 %attr(754,root,root) /etc/rc.d/init.d/niceshaper
This page took 0.039931 seconds and 3 git commands to generate.