1 |
charliebrady |
1.1 |
Summary: SME Server panel to add sshkeys for users. |
2 |
|
|
%define name smeserver-sshkeys |
3 |
|
|
Name: %{name} |
4 |
|
|
%define version 0.9 |
5 |
|
|
%define release 2 |
6 |
|
|
Version: %{version} |
7 |
|
|
Release: %{release} |
8 |
|
|
Distribution: SME Server |
9 |
|
|
Copyright: GPL |
10 |
|
|
URL: http://www.dungog.net/sme |
11 |
|
|
Group: SMEserver/addon |
12 |
|
|
Source: %{name}-%{version}.tar.gz |
13 |
|
|
Packager: Stephen Noble <support@dungog.net> |
14 |
|
|
BuildArchitectures: noarch |
15 |
|
|
BuildRoot: /var/tmp/%{name}-%{version} |
16 |
|
|
Requires: e-smith-base, e-smith-release >= 7.0, |
17 |
|
|
AutoReqProv: no |
18 |
|
|
|
19 |
|
|
%description |
20 |
|
|
SME Server panel to add sshkeys for users. |
21 |
|
|
Optionally provides a user-manager panel where users can |
22 |
|
|
add sshkeys for themselves |
23 |
|
|
|
24 |
|
|
%changelog |
25 |
|
|
* Wed Dec 14 2005 Stephen Noble <support@dungog.net> |
26 |
|
|
- mkdir ~/.ssh, chown to $user |
27 |
|
|
- [0.9-2] |
28 |
|
|
|
29 |
|
|
* Mon Dec 12 2005 Stephen Noble <support@dungog.net> |
30 |
|
|
- contains sshkeys & userpanel-sshkeys |
31 |
|
|
- initial release |
32 |
|
|
- [0.9-1] |
33 |
|
|
|
34 |
|
|
%prep |
35 |
|
|
%setup |
36 |
|
|
|
37 |
|
|
%build |
38 |
|
|
perl createlinks |
39 |
|
|
|
40 |
|
|
%install |
41 |
|
|
rm -rf $RPM_BUILD_ROOT |
42 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
43 |
|
|
rm -f %{name}-%{version}-filelist |
44 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
45 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
46 |
|
|
|
47 |
|
|
%clean |
48 |
|
|
cd .. |
49 |
|
|
rm -rf %{name}-%{version} |
50 |
|
|
|
51 |
|
|
%pre |
52 |
|
|
%preun |
53 |
|
|
|
54 |
|
|
%post |
55 |
|
|
#new installs |
56 |
|
|
if [ $1 = 1 ] ; then |
57 |
|
|
|
58 |
|
|
DBS=`find /home/e-smith/db/navigation -type f -name "navigation.*"` |
59 |
|
|
for db in $DBS ; do |
60 |
|
|
r=`/sbin/e-smith/db $db get userpanel-sshkeys 2>/dev/null` |
61 |
|
|
if [ -z "$r" ] ; then |
62 |
|
|
/sbin/e-smith/db $db set userpanel-sshkeys panel Description "Ssh keys" DescriptionWeight 600 Heading "Your Settings" HeadingWeight 100 2>/dev/null |
63 |
|
|
fi |
64 |
|
|
r=`/sbin/e-smith/db $db get sshkeys 2>/dev/null` |
65 |
|
|
if [ -z "$r" ] ; then |
66 |
|
|
/sbin/e-smith/db $db set sshkeys panel Description "User ssh keys" DescriptionWeight 3170 Heading "Security" HeadingWeight 3000 2>/dev/null |
67 |
|
|
fi |
68 |
|
|
done |
69 |
|
|
|
70 |
|
|
fi |
71 |
|
|
|
72 |
|
|
#upgrades (and new installs) |
73 |
|
|
#/sbin/e-smith/signal-event conf-userpanel |
74 |
|
|
|
75 |
|
|
%postun |
76 |
|
|
#uninstall |
77 |
|
|
if [ $1 = 0 ] ; then |
78 |
|
|
|
79 |
|
|
DBS=`find /home/e-smith/db/navigation -type f -name "navigation.*"` |
80 |
|
|
for db in $DBS ; do |
81 |
|
|
/sbin/e-smith/db $db delete userpanel-sshkeys 2>/dev/null |
82 |
|
|
/sbin/e-smith/db $db delete sshkeys 2>/dev/null |
83 |
|
|
done |
84 |
|
|
fi |
85 |
|
|
|
86 |
|
|
%files -f %{name}-%{version}-filelist |
87 |
|
|
%defattr(-,root,root) |
88 |
|
|
|