4
4
License: GPLv2, GPLv3
5
5
Url: http://gsmartcontrol.berlios.de
6
6
Vendor: Alexander Shaduri <ashaduri 'at' gmail.com>
7
Packager: Alexander Shaduri <ashaduri 'at' gmail.com>
7
# Packager: Alexander Shaduri <ashaduri 'at' gmail.com>
8
8
Source: gsmartcontrol-%{version}.tar.bz2
9
9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
10
10
Summary: GSmartControl - Hard Disk Health Inspection Tool
15
15
Group: Hardware/Other
18
# Support build service rpmlint. Disabled - the build service
19
# stopped recognizing the flag for some architectures.
20
# %if 0%{?opensuse_bs} && 0%{?suse_version} >= 1010
25
19
# Dependencies for various distributions. The actual deps are:
26
20
# smartmontools, pcre, (gtkmm2 >= 2.12 || (gtkmm2 >= 2.6.0 && libglademm >= 2.4.0))
46
40
BuildRequires: gcc-c++, libstdc++-devel, pcre-devel, gtkmm24-devel >= 2.6.0, libglademm-devel >= 2.4.0
43
BuildRequires: update-desktop-files
45
%if 0%{?suse_version} >= 1030
62
61
BuildRequires: gcc-c++, pcre-devel, gtkmm24-devel >= 2.6.0, libglademm24-devel >= 2.4.0
65
# Fedora doesn't include gnomesu or anything similar except beesu (since 11), so force it.
66
# usermode-gtk is for consolehelper-gtk (optional for beesu, needed for GUI auth).
67
%if 0%{?fedora_version} >= 11
68
Requires: beesu, usermode-gtk
64
# Fedora with consolehelper.
65
# usermode-gtk is for consolehelper-gtk.
66
%if 0%{?fedora_version}
67
Requires: usermode-gtk
106
105
# Set up for parallel builds
107
numprocs=`egrep -c ^cpu[0-9]+ /proc/stat || :`
108
if [ "$numprocs" = "0" ]; then
106
#numprocs=`grep -E -c ^cpu[0-9]+ /proc/stat || :`
107
#if [ "$numprocs" = "0" ]; then
118
117
make DESTDIR=%buildroot install-strip
119
118
# Remove the icon cache file "make install" generates, to avoid package conflicts.
120
119
rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
121
%if 0%{?suse_version}
122
%suse_update_desktop_file -n %{name}
125
# There are some png file duplicates, hardlink them.
126
%if 0%{?suse_version} >= 1030
131
# We install icons, so this is needed.
132
%if 0%{?suse_version} >= 1140
134
%icon_theme_cache_post
137
%icon_theme_cache_postun
144
%if 0%{?fedora_version}
145
# We still retain gsmartcontrol-root for consistency with other distributions.
147
# Make the desktop file run gsmartcontrol instead of gsmartcontrol-root
148
sed "s|gsmartcontrol-root|gsmartcontrol|g" %{buildroot}%{_datadir}/applications/gsmartcontrol.desktop > %{buildroot}%{_datadir}/applications/gsmartcontrol.desktop.new
149
mv -f %{buildroot}%{_datadir}/applications/gsmartcontrol.desktop.new %{buildroot}%{_datadir}/applications/gsmartcontrol.desktop
151
# The rest is taken from the official fedora spec:
152
# http://pkgs.fedoraproject.org/cgit/gsmartcontrol.git/tree/
154
# Set up for console-helper
155
mkdir -p %{buildroot}%{_sbindir}
156
# Add a copy as "gsmartcontrol-noroot", since gsmartcontrol will always
157
# ask for root password.
158
cp %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-noroot
159
mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}/%{name}
160
ln -s consolehelper %{buildroot}%{_bindir}/%{name}
162
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
163
cat <<EOF >%{buildroot}%{_sysconfdir}/pam.d/%{name}
165
auth include config-util
166
account include config-util
167
session include config-util
170
mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
171
cat <<EOF >%{buildroot}%{_sysconfdir}/security/console.apps/%{name}
173
PROGRAM=/usr/sbin/gsmartcontrol
123
181
%if 0%{?mandriva_version}
124
182
desktop-file-install --vendor="" \
137
195
%defattr(-,root,root)
139
197
%attr(0755,root,root) %{_bindir}/*
140
# %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/*
198
# %%attr(0644,root,root) %%config(noreplace) %%{_sysconfdir}/*
142
200
%doc %{_datadir}/doc/gsmartcontrol
143
201
%doc %{_mandir}/man1/*
145
203
%{_datadir}/gsmartcontrol
146
# %{_datadir}/gsmartcontrol/*
204
# %%{_datadir}/gsmartcontrol/*
147
205
%{_datadir}/applications/*.desktop
148
206
%{_datadir}/icons/*
149
207
%{_datadir}/pixmaps/*
209
%if 0%{?fedora_version}
210
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
211
%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}
212
%{_sbindir}/gsmartcontrol
154
* Fri Dec 10 2010 Alexander Shaduri <ashaduri 'at' gmail.com>
155
- Fixes for Fedora 14.
157
* Fri Nov 14 2008 Alexander Shaduri <ashaduri 'at' gmail.com>
158
- Updated .spec file to incorporate changes from the official Mandriva package.
160
* Mon Oct 06 2008 Alexander Shaduri <ashaduri 'at' gmail.com>
161
- Updated .spec file to support OpenSUSE < 10.3, Fedora and friends,
162
Mandriva (for OpenSUSE Build Service).
164
* Mon Sep 15 2008 Alexander Shaduri <ashaduri 'at' gmail.com>
165
- Initial .spec file.