forked from pool/bwbar
Andreas Stieger
661cf8daff
- add bwbar-1.2.3-libpng15.patch to fix build against libpng15 - reformat spec file OBS-URL: https://build.opensuse.org/request/show/138048 OBS-URL: https://build.opensuse.org/package/show/network:utilities/bwbar?expand=0&rev=3
87 lines
2.5 KiB
RPMSpec
87 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package bwbar
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: bwbar
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: libpng-devel
|
|
Url: http://www.kernel.org/pub/software/web/bwbar/
|
|
Summary: Bandwidth usage bar
|
|
License: GPL-2.0+
|
|
Group: Productivity/Networking/Other
|
|
Version: 1.2.3
|
|
Release: 0
|
|
Source: %{name}-%{version}.tar.bz2
|
|
Source1: COPYING
|
|
Source2: bwbar_config
|
|
Source3: bwbar_initscript
|
|
# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-analyzer/bwbar/files/bwbar-1.2.3-libpng15.patch?revision=1.1&pathrev=HEAD
|
|
# PATCH-FIX-UPSTREAM bwbar-1.2.3-libpng15.patch andreas.stieger@gmx.de -- fixes build against libpng15
|
|
Patch0: bwbar-1.2.3-libpng15.patch
|
|
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
|
|
%patch0
|
|
|
|
%{__cp} %{SOURCE1} .
|
|
|
|
%build
|
|
CFLAGS="-Wall $RPM_OPT_FLAGS"
|
|
%configure --prefix=%{_prefix} \
|
|
--infodir=%{_infodir} \
|
|
--mandir=%{_mandir}
|
|
%__make %{?_smp_mflags}
|
|
|
|
%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
|