summaryrefslogtreecommitdiffstats
path: root/specs/knutclient.spec.fedora.8
blob: 9603e05f97ba0da2f643652ce3b544048378d2cf (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
Summary:   NUT GUI Interface
Name:      knutclient
Version:   0.9.5
Release:   1
License:   GNU GPL
Vendor:    Daniel Prynych <Daniel@prynych.cz>
Url:       http://www.knut.noveradsl.cz/knutclient
Packager:  Daniel Prynych <Daniel@prynych.cz>
Group:     Applications/System
Prefix:    /usr
Source:    knutclient-0.9.5.tar.gz
BuildRoot: %{_tmppath}/build-root-%{name}

%description
Knutclient is a GUI interface for UPS system NUT

%prep
%setup
make -f Makefile.cvs
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} $LOCALFLAGS

%build
# Setup for parallel builds
numprocs=`egrep -c ^cpu[0-9]+ /proc/stat || :`
if [ "$numprocs" = "0" ]; then
  numprocs=1
fi

make -j$numprocs

%install
make install-strip DESTDIR=$RPM_BUILD_ROOT

cd $RPM_BUILD_ROOT

#mkdir -p var/lib/menu/kde/Applications/Extras/Accessories/
#mkdir -p usr/share/applications/
#cp -a usr/share/applnk/Utilities/knutclient.desktop usr/share/applications/
#rm -rf usr/share/applnk

#cd var/lib/menu/kde/Applications/Extras/Accessories/
#ln -s /usr/share/applications/knutclient.desktop kde-knutclient.desktop
# as defattr point to root,root this will not work
#chown desktop.desktop kde-knutclient.desktop

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 $RPM_BUILD_DIR/%{name}
rm -rf ../file.list.%{name}


%files -f ../file.list.%{name}
%defattr(-,root,root,0755)