~ubuntu-branches/debian/sid/gsmartcontrol/sid

« back to all changes in this revision

Viewing changes to gsmartcontrol.spec.in

  • Committer: Package Import Robot
  • Author(s): Giuseppe Iuculano
  • Date: 2013-05-31 11:41:52 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130531114152-5ljhkuswwpt4kdwo
Tags: 0.8.7-1
* [314881d] Updated debian/watch
* [18ebada] Imported Upstream version 0.8.7
* [c2a1f1b] debian/rules: Provide build-arch and build-indep
* [d3036a4] Enabled Hardening Options
* [2edfb87] Refreshed patches and removed patches apllied upstream
* [ac3b953] Bump to standard versions 3.9.4
* [292c276] Remove quilt from depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
16
16
%endif
17
17
 
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
21
 
# Support: rpmlint-bs
22
 
# %endif
23
 
 
24
18
 
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
47
41
%endif
48
42
%endif
 
43
BuildRequires: update-desktop-files
 
44
 
 
45
%if 0%{?suse_version} >= 1030
 
46
BuildRequires: fdupes
 
47
%endif
49
48
 
50
49
%endif
51
50
 
62
61
BuildRequires: gcc-c++, pcre-devel, gtkmm24-devel >= 2.6.0, libglademm24-devel >= 2.4.0
63
62
%endif
64
63
 
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
69
68
%endif
70
69
 
71
70
%endif
104
103
 
105
104
%build
106
105
# Set up for parallel builds
107
 
numprocs=`egrep -c ^cpu[0-9]+ /proc/stat || :`
108
 
if [ "$numprocs" = "0" ]; then
109
 
        numprocs=1
110
 
fi
111
 
 
112
 
make -j$numprocs
113
 
# make
 
106
#numprocs=`grep -E -c ^cpu[0-9]+ /proc/stat || :`
 
107
#if [ "$numprocs" = "0" ]; then
 
108
#       numprocs=1
 
109
#fi
 
110
#make -j$numprocs
 
111
make
114
112
 
115
113
 
116
114
%install
117
 
# %makeinstall
 
115
 
 
116
# %%makeinstall
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
120
 
 
121
%if 0%{?suse_version}
 
122
%suse_update_desktop_file -n %{name}
 
123
 
 
124
 
 
125
# There are some png file duplicates, hardlink them.
 
126
%if 0%{?suse_version} >= 1030
 
127
%fdupes
 
128
%endif
 
129
 
 
130
 
 
131
# We install icons, so this is needed.
 
132
%if 0%{?suse_version} >= 1140
 
133
%post
 
134
%icon_theme_cache_post
 
135
 
 
136
%postun
 
137
%icon_theme_cache_postun
 
138
%endif
 
139
 
 
140
# endif suse
 
141
%endif
 
142
 
 
143
 
 
144
%if 0%{?fedora_version}
 
145
# We still retain gsmartcontrol-root for consistency with other distributions.
 
146
 
 
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
 
150
 
 
151
# The rest is taken from the official fedora spec:
 
152
# http://pkgs.fedoraproject.org/cgit/gsmartcontrol.git/tree/
 
153
 
 
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}
 
161
 
 
162
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
 
163
cat <<EOF >%{buildroot}%{_sysconfdir}/pam.d/%{name}
 
164
#%%PAM-1.0
 
165
auth            include         config-util
 
166
account         include         config-util
 
167
session         include         config-util
 
168
EOF
 
169
 
 
170
mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
 
171
cat <<EOF >%{buildroot}%{_sysconfdir}/security/console.apps/%{name}
 
172
USER=root
 
173
PROGRAM=/usr/sbin/gsmartcontrol
 
174
SESSION=true
 
175
EOF
 
176
 
 
177
# endif fedora
 
178
%endif
 
179
 
122
180
 
123
181
%if 0%{?mandriva_version}
124
182
desktop-file-install --vendor="" \
137
195
%defattr(-,root,root)
138
196
 
139
197
%attr(0755,root,root) %{_bindir}/*
140
 
# %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/*
 
198
# %%attr(0644,root,root) %%config(noreplace) %%{_sysconfdir}/*
141
199
 
142
200
%doc %{_datadir}/doc/gsmartcontrol
143
201
%doc %{_mandir}/man1/*
144
202
 
145
203
%{_datadir}/gsmartcontrol
146
 
# %{_datadir}/gsmartcontrol/*
 
204
# %%{_datadir}/gsmartcontrol/*
147
205
%{_datadir}/applications/*.desktop
148
206
%{_datadir}/icons/*
149
207
%{_datadir}/pixmaps/*
150
208
 
151
 
 
 
209
%if 0%{?fedora_version}
 
210
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
 
211
%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}
 
212
%{_sbindir}/gsmartcontrol
 
213
%endif
152
214
 
153
215
%changelog
154
 
* Fri Dec 10 2010 Alexander Shaduri <ashaduri 'at' gmail.com>
155
 
- Fixes for Fedora 14.
156
 
 
157
 
* Fri Nov 14 2008 Alexander Shaduri <ashaduri 'at' gmail.com>
158
 
- Updated .spec file to incorporate changes from the official Mandriva package.
159
 
 
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).
163
 
 
164
 
* Mon Sep 15 2008 Alexander Shaduri <ashaduri 'at' gmail.com>
165
 
- Initial .spec file.