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}%{?dist} |
8 |
Distribution: SME Server |
9 |
License: GPL |
10 |
URL: http://www.dungog.net/sme |
11 |
Group: SMEserver/addon |
12 |
Source: %{name}-%{version}.tar.gz |
13 |
BuildArchitectures: noarch |
14 |
BuildRoot: /var/tmp/%{name}-%{version} |
15 |
Requires: e-smith-base, e-smith-release >= 7.0, |
16 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
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 |
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com> |
26 |
- Clean up spec so package can be built by koji/plague |
27 |
|
28 |
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com> |
29 |
- Update to new release naming. No functional changes. |
30 |
- Make Packager generic |
31 |
|
32 |
* Wed Dec 14 2005 Stephen Noble <support@dungog.net> |
33 |
- mkdir ~/.ssh, chown to $user |
34 |
- [0.9-2] |
35 |
|
36 |
* Mon Dec 12 2005 Stephen Noble <support@dungog.net> |
37 |
- contains sshkeys & userpanel-sshkeys |
38 |
- initial release |
39 |
- [0.9-1] |
40 |
|
41 |
%prep |
42 |
%setup |
43 |
|
44 |
%build |
45 |
perl createlinks |
46 |
|
47 |
%install |
48 |
rm -rf $RPM_BUILD_ROOT |
49 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
50 |
rm -f %{name}-%{version}-filelist |
51 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
52 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
53 |
|
54 |
%clean |
55 |
cd .. |
56 |
rm -rf %{name}-%{version} |
57 |
|
58 |
%pre |
59 |
%preun |
60 |
|
61 |
%post |
62 |
#new installs |
63 |
if [ $1 = 1 ] ; then |
64 |
|
65 |
DBS=`find /home/e-smith/db/navigation -type f -name "navigation.*"` |
66 |
for db in $DBS ; do |
67 |
r=`/sbin/e-smith/db $db get userpanel-sshkeys 2>/dev/null` |
68 |
if [ -z "$r" ] ; then |
69 |
/sbin/e-smith/db $db set userpanel-sshkeys panel Description "Ssh keys" DescriptionWeight 600 Heading "Your Settings" HeadingWeight 100 2>/dev/null |
70 |
fi |
71 |
r=`/sbin/e-smith/db $db get sshkeys 2>/dev/null` |
72 |
if [ -z "$r" ] ; then |
73 |
/sbin/e-smith/db $db set sshkeys panel Description "User ssh keys" DescriptionWeight 3170 Heading "Security" HeadingWeight 3000 2>/dev/null |
74 |
fi |
75 |
done |
76 |
|
77 |
fi |
78 |
|
79 |
#upgrades (and new installs) |
80 |
#/sbin/e-smith/signal-event conf-userpanel |
81 |
|
82 |
%postun |
83 |
#uninstall |
84 |
if [ $1 = 0 ] ; then |
85 |
|
86 |
DBS=`find /home/e-smith/db/navigation -type f -name "navigation.*"` |
87 |
for db in $DBS ; do |
88 |
/sbin/e-smith/db $db delete userpanel-sshkeys 2>/dev/null |
89 |
/sbin/e-smith/db $db delete sshkeys 2>/dev/null |
90 |
done |
91 |
fi |
92 |
|
93 |
%files -f %{name}-%{version}-filelist |
94 |
%defattr(-,root,root) |
95 |
|