/[packages]/updates/1/webmin/current/SPECS/webmin.spec
ViewVC logotype

Annotation of /updates/1/webmin/current/SPECS/webmin.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 60039 - (hide annotations) (download)
Fri Feb 25 22:27:54 2011 UTC (13 years, 1 month ago) by ennael
Original Path: cauldron/webmin/current/SPECS/webmin.spec
File size: 10294 byte(s)
imported package webmin
1 ennael 60039 # zero out some useless deps.
2     # (tv) we'd better had a link in minicom & package Encode::HanConvert:
3     %define _requires_exceptions HanConvert\\|runscript
4    
5     # don't spend time with this either
6     %define _enable_debug_packages %{nil}
7     %define debug_package %{nil}
8    
9     %define i18n_date 20080131
10     %define with_i18n_tarball 1
11     %define with_i18n_patch 1
12    
13     %if %mandriva_branch == Cooker
14     # Cooker
15     %define release %mkrel 1
16     %else
17     # Old distros
18     %define subrel 1
19     %define release %mkrel 0
20     %endif
21    
22     Summary: An SSL web-based administration interface for Unix systems
23     Name: webmin
24     Version: 1.530
25     Release: %{release}
26     License: BSD
27     Group: System/Configuration/Other
28     URL: http://www.webmin.com/webmin/
29     Source0: http://heanet.dl.sourceforge.net/sourceforge/webadmin/%{name}-%{version}.tar.gz
30     Source2: other.modules.tar.bz2
31     Source30: webmin-mandriva-theme.tar.bz2
32     # some images were missing
33     Source33: advanced.png
34     Source34: descs.png
35     Source4: webmin-postinstallscript.sh
36     Source5: webmin
37     Source6: webmin.initscript
38     Source9: http://www.openit.it/index.php/openit_en/content/download/2474/10171/file/openvpn-2.0.wbm.gz
39     Source10: webmin.pam
40     Source11: webmin-16.png
41     Source12: webmin-32.png
42     Source13: webmin-48.png
43     # uses include instead of pam_stack
44     Source14: webmin.pam-new
45     Source15: webmin.logrotate
46     # (gc) have the updates; this needs to change for each version and/or release, see
47     # http://www.webmin.com/webmin/updates.html
48     # Other Themes
49     Source51: http://www.gehrigal.net/download/webmin_theme/webmin-theme_gehrigal_0.41.wbt
50     # the configurator for this theme
51     Source52: http://www.gehrigal.net/download/webmin_themeconfig/webmin_gehrigal-themeconfigurator_0.21a.wbm
52     # Webmin Module Usermonitor
53     Source53: http://www.gehrigal.net/download/webmin_usermonitor/webmin-module_usermonitor_0.12a.wbm
54     # Other modules
55     Source54: http://gaia.anet.fr/webmin/openldap/openldap-0_6.wbm
56     Source541: http://gaia.anet.fr/webmin/openldap/openldap2-0_1.wbm
57     Source55: http://www.bvan.f2s.com/ldap_groups_LDAPapi.wbm
58     Source56: http://www.bvan.f2s.com/ldap_browser_LDAPapi.wbm
59     Source57: http://prdownloads.sourceforge.net/netatalk/netatalk.wbm
60     Source99: webmin-scripts-i18n.tar.bz2
61     Source100: webmin-i18n-%{i18n_date}.tar.bz2
62     Patch0: webmin-fix-configs.diff
63     Patch1: webmin-1.100-remove-atboot-problem
64     Patch5: webmin-fix-newmods.patch
65     Patch7: webmin-0.85-never-fail-detect-os.patch
66     Patch8: webmin-0.85-enable-changed-theme-at-installation.patch
67     Patch9: webmin-1.510-fix-status-in-init.patch
68     Patch10: webmin-1.510-fix-os-list.patch
69    
70     Patch13: webmin-openldap.patch
71     Patch15: webmin-fix-netatalk-paths.patch
72     Patch17: webmin-1.220-remove-mandrakestuff-from-init.patch
73     Patch19: webmin-0.92-add-default-configs-logviewer-fp2k.patch
74     Patch21: webmin-0.950-add-netsaint-mandrake-config.patch
75     #Patch22: webmin-1.220-fix-logfile-location.patch.bz2
76     Patch23: webmin-1.020-ssl-location.patch
77     Patch24: webmin-1.020-suppress-missing-netatalk-interfaces.patch
78     Patch26: webmin-1.060-mysql-fix-installing-missing-packages.patch
79     Patch29: webmin-1.100-let-localauth-config.patch
80     Patch32: webmin-1.310-usermin-fix-installing-missing-package.diff
81     Patch33: webmin-1.130-postgresql-fix-installing-missing-packages.patch
82     Patch35: webmin-1.220-usermin-fix-index.patch
83     Patch36: webmin-1.350-mandriva_theme.diff
84     Patch37: webmin-temp-permission-fix.diff
85     Patch38: webmin-ssldir-cosmetic.diff
86     Patch39: webmin-fix-bandwith.diff
87     Patch40: webmin-fix-sarg.diff
88     Requires(pre): rpm-helper
89     Requires: perl
90     Requires: perl-CGI
91     Requires: lsof
92     Requires(pre): sed chkconfig findutils coreutils initscripts grep perl-Net_SSLeay perl-Authen-PAM
93     Provides: %{name}-%{version}
94     Provides: %{name}-theme-mandriva
95     Obsoletes: %{name}-theme-mandriva
96     BuildArch: noarch
97     Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
98    
99     %description
100     A web-based administration interface for Unix systems. Using Webmin you can
101     configure DNS, Samba, NFS, local/remote filesystems, Apache, Sendmail/Postfix,
102     and more using your web browser.
103    
104     After installation, enter the URL https://localhost:10000/ into your browser
105     and login as root with your root password. Please consider logging in and
106     modify your password for security issue.
107    
108     PLEASE NOTE THAT THIS VERSION NOW USES SECURE WEB TRANSACTIONS: YOU HAVE TO
109     LOGIN TO "https://localhost:10000/" AND NOT "http://localhost:10000/".
110    
111     %prep
112    
113     %setup -q -a2 -a30 -a51 -a52 -a53 -a55 -a56
114     # Unknow extension, rpm won't unpack it.
115     tar xf %{SOURCE54}
116     tar xf %{SOURCE541}
117     tar xf %{SOURCE57}
118    
119     install -m 0644 %{SOURCE33} mandriva/webmin/images
120     install -m 0644 %{SOURCE34} mandriva/webmin/images
121     rm -fr %{name}-%{version}/dhcpd
122     rm -fr %{name}-%{version}/useradmin
123    
124     %setup -q -D -T -c -a 9 -n %{name}-%{version}
125     %if %{mdkversion} < 20101
126     %patch0 -p0
127     %endif
128     %patch1 -p1
129     %patch5 -p0
130     %patch7 -p1
131     %patch8 -p1
132     %patch9 -p0
133     %patch10 -p1
134    
135     %patch13 -p0
136     %patch15 -p0
137     #%patch17 -p1
138     %patch19 -p0
139     %patch21 -p0
140     #%patch22 -p1
141     %patch23 -p1
142     %patch24 -p1
143     %patch26 -p1
144     %patch29 -p1
145     %patch32 -p0
146     %patch33 -p1
147     %patch35 -p1
148     %patch36 -p0
149     %patch37 -p1
150     %patch38 -p1
151     %patch39 -p1
152     %patch40 -p1
153     # use MD5 by default
154    
155     for i in */config-mandrake-linux-8.2; do n=`echo $i | perl -pe 's/...$/9.0/'`; [ -e $n ] || cp $i $n; done
156     for i in */config-mandrake-linux-9.0; do n=`echo $i | perl -pe 's/...$/9.1/'`; [ -e $n ] || cp $i $n; done
157     for i in */config-mandrake-linux-9.1; do n=`echo $i | perl -pe 's/...$/9.2/'`; [ -e $n ] || cp $i $n; done
158     for i in */config-mandrake-linux-9.2; do n=`echo $i | perl -pe 's/...$/10.0/'`; [ -e $n ] || cp $i $n; done
159     for i in */config-mandrake-linux-10.0; do n=`echo $i | perl -pe 's/....$/10.1/'`; [ -e $n ] || cp $i $n; done
160     for i in */config-mandrake-linux-10.1; do n=`echo $i | perl -pe 's/....$/10.2/'`; [ -e $n ] || cp $i $n; done
161     for i in */config-mandrake-linux-10.2; do n=`echo $i | perl -pe 's/....$/2006.0/'`; [ -e $n ] || cp $i $n; done
162     find bind8 -type f -maxdepth 1 | xargs perl -pi -e 's|/var/run/named\.pid|/var/run/named/named.pid|'
163    
164     # daouda: added mandriva-linux to known OS
165     cp config-mandrake-linux config-mandriva-linux
166    
167     # force theme to blue
168     pushd theme_gehrigal/skins
169     ./change_skin.pl s blueedition.skininfo
170     popd
171    
172     perl -pi -e 's|redhat-linux(?! mandriva-linux)|redhat-linux mandriva-linux| if $_ =~ /^os_support.*redhat-linux/ && $_ !~ /mandriva-linux/' */module.info
173     #'
174     perl -pi -e 's|/etc/smb\.conf|/etc/samba/smb\.conf|' samba/config-mandrake-linux
175    
176     (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl -
177     rm -f mount/freebsd-mounts-*
178     rm -f mount/openbsd-mounts-*
179    
180     find -name ".xvpics" -o -name ".*.swp" | xargs rm -rf
181    
182     # i18n
183     %if %{with_i18n_tarball}
184     #tar -jxf %{_sourcedir}/webmin-i18n-%{i18n_date}.tar.bz2
185     tar -jxf %{SOURCE100}
186     %endif
187    
188     %build
189    
190     # nothing to do here...
191    
192     %install
193     rm -rf %{buildroot}
194    
195     # IMPORTANT: there is no %{_datadir} and so on, since the directories are decided by the post install script.
196     mkdir -p %{buildroot}/usr/share/webmin
197     mkdir -p %{buildroot}/%{_initrddir}
198     mkdir -p %{buildroot}/usr/bin
199    
200     find -type f -print0 | xargs -0 chmod a+r
201     find -type d -print0 | xargs -0 chmod a+rx
202    
203     # (gc) remove ldap module, we don't have perl modules to make it work
204     rm -rf ldap
205    
206     cp -a * %{buildroot}/usr/share/webmin
207     install -m755 %{SOURCE6} %{buildroot}/%{_initrddir}/webmin
208     install -m755 %{SOURCE4} %{buildroot}/usr/share/webmin/postinstall.sh
209     install -m755 %{SOURCE5} %{buildroot}/usr/bin
210    
211     mkdir -p %{buildroot}/%{_sysconfdir}/pam.d
212    
213     %if %{mdkversion} < 200610
214     install -m755 %{SOURCE10} %{buildroot}/%{_sysconfdir}/pam.d/webmin
215     %else
216     install -m755 %{SOURCE14} %{buildroot}/%{_sysconfdir}/pam.d/webmin
217     %endif
218    
219     rm -rf %{buildroot}/usr/share/webmin/*/{CVS,*/CVS}
220     rm -f `find %{buildroot} -type f -name .cvsignore`
221    
222     # (gc) remove zero-length files (to check sometimes if they are still zero-length'ed)
223     for i in /usr/share/webmin/caldera/images/letters/254.gif /usr/share/webmin/i4lctrl-0.6.7/lang/de /usr/share/webmin/caldera/images/letters/255.gif; do
224     if [ -f $i ]; then rm -f %{buildroot}$i; fi
225     done
226    
227     echo "rpm" > %{buildroot}/usr/share/webmin/install-type
228    
229     # (sb) remove development file
230     rm -f %{buildroot}/usr/share/webmin/mount/macos-mounts.c
231    
232     %if %{mdkversion} < 20101
233     # (deush) mandriva is the default theme
234     echo 'mandriva' > %{buildroot}%{_datadir}/webmin/defaulttheme
235     %else
236     echo 'blue-theme' > %{buildroot}%{_datadir}/webmin/defaulttheme
237     %endif
238    
239     # (oe) remove invalid file that breaks webmin
240     rm -f %{buildroot}%{_datadir}/webmin/mandriva/config.cgi
241    
242     # Install icons
243     install -d -m 0755 %{buildroot}%{_liconsdir}
244     install -d -m 0755 %{buildroot}%{_miconsdir}
245     install -m 0644 %{SOURCE11} %{buildroot}%{_miconsdir}/webmin.png
246     install -m 0644 %{SOURCE12} %{buildroot}%{_iconsdir}/webmin.png
247     install -m 0644 %{SOURCE11} %{buildroot}%{_liconsdir}/webmin.png
248    
249     # Menu entry
250    
251     # XDG menu
252     install -d %{buildroot}%{_datadir}/applications
253     cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop << EOF
254     [Desktop Entry]
255     Name=%{name}
256     Comment=%{summary}
257     Exec=%{_bindir}/www-browser https://localhost:10000/
258     Icon=%{name}
259     Terminal=false
260     Type=Application
261     Categories=X-MandrivaLinux-System-Configuration-Other;Settings;
262     EOF
263    
264     rm -fr %{buildroot}/usr/share/webmin/acl/Authen-SolarisRBAC-0.1
265    
266     #logrotate
267     install -d %{buildroot}%{_sysconfdir}/logrotate.d
268     install -m 0644 %{SOURCE15} %{buildroot}%{_sysconfdir}/logrotate.d/webmin
269    
270     %post
271     %if %mdkversion > 200900
272     %_create_ssl_certificate -b miniserv
273     %endif
274     if [ "$1" != 0 ]; then
275     service webmin status >/dev/null 2>/dev/null && need_restart=1
276     service webmin stop >/dev/null 2>/dev/null || :
277     else
278     [[ -e /etc/cron.allow ]] && if [ "x`grep root /etc/cron.allow`" == "x" ] ; then
279     echo root >> /etc/cron.allow
280     fi
281     fi
282     /usr/share/webmin/postinstall.sh
283     %_post_service webmin
284     [[ -n $need_restart ]] && service webmin start >/dev/null 2>/dev/null || :
285     %if %mdkversion < 200900
286     %update_menus
287     %endif
288    
289     %preun
290     %_preun_service webmin
291    
292     %postun
293     if [ "$1" = 0 ]; then
294     rm -rf /etc/webmin /var/webmin /var/lib/webmin /var/run/webmin /var/log/webmin
295     fi
296     %if %mdkversion < 200900
297     %clean_menus
298     %endif
299    
300     %clean
301     rm -rf %{buildroot}
302    
303     %files
304     %defattr(-, root, root, 0755)
305     %doc README LICENCE
306     %{_initrddir}/webmin
307     %config(noreplace) %{_sysconfdir}/pam.d/webmin
308     %config(noreplace) %{_sysconfdir}/logrotate.d/webmin
309     /usr/share/webmin
310     /usr/bin/%{name}
311     %{_iconsdir}/%{name}.png
312     %{_liconsdir}/%{name}.png
313     %{_miconsdir}/%{name}.png
314     %{_datadir}/applications/*.desktop
315    
316    

  ViewVC Help
Powered by ViewVC 1.1.30