SHA256
1
0
forked from pool/bwbar
bwbar/bwbar.spec

77 lines
1.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package bwbar (Version 1.2.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: bwbar
BuildRequires: gcc-c++ libpng-devel
Url: http://www.kernel.org/pub/software/web/bwbar/
License: GPL v2 or later
Group: Productivity/Networking/Other
AutoReqProv: on
Summary: Bandwidth usage bar
Version: 1.2.3
Release: 1
Source: %{name}-%{version}.tar.bz2
Source1: COPYING
Source2: bwbar_config
Source3: bwbar_initscript
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
bwbar is a small program that generates a text and a graphical readout
of the current bandwidth use to be displayed on a web page.
It is used, among others, at http://www.kernel.org/.
Authors:
--------
H. Peter Anvin <hpa@zytor.com>
%prep
%setup -q
%{__cp} %{SOURCE1} .
%build
CFLAGS="-Wall $RPM_OPT_FLAGS"
%configure --prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir}
make
%install
install -d $RPM_BUILD_ROOT%{_bindir}
install -m 755 --strip bwbar $RPM_BUILD_ROOT%{_bindir}
install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
install -m 755 -D %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name}
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
ln -svf ../../etc/init.d/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%postun
%insserv_cleanup
%restart_on_update
%preun
%stop_on_removal
%files
%defattr(-, root, root)
%doc README COPYING
%{_bindir}/*
%{_sbindir}/*
%config %{_sysconfdir}/%{name}
%config %{_sysconfdir}/init.d/%{name}
%changelog