Last change
on this file since 388 was 388, checked in by Bruno Cornec, 16 years ago |
dploy is now managed by pb 0.9.0
|
File size:
1.4 KB
|
Line | |
---|
1 | #
|
---|
2 | # $Id$
|
---|
3 | #
|
---|
4 |
|
---|
5 | Summary: dploy.org common tools
|
---|
6 | Summary(fr): Outils communs pour dploy.org
|
---|
7 |
|
---|
8 | Name: PBPKG
|
---|
9 | Version: PBVER
|
---|
10 | Release: PBTAGPBSUF
|
---|
11 | License: GPL
|
---|
12 | Group: PBGRP
|
---|
13 | Url: PBURL
|
---|
14 | Source: PBSRC
|
---|
15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
|
---|
16 | Requires: openssh, PBDEP
|
---|
17 |
|
---|
18 | %description
|
---|
19 | PBDESC
|
---|
20 |
|
---|
21 | %description -l fr
|
---|
22 | Outils communs pour dploy.org
|
---|
23 |
|
---|
24 | %prep
|
---|
25 | %setup -q
|
---|
26 |
|
---|
27 | %install
|
---|
28 | %{__rm} -rf $RPM_BUILD_ROOT
|
---|
29 | export DESTDIR=$RPM_BUILD_ROOT
|
---|
30 | export PREFIX=%{_exec_prefix}
|
---|
31 | export CONFDIR=%{_sysconfdir}/PBPROJ
|
---|
32 | ./install.sh
|
---|
33 |
|
---|
34 | %clean
|
---|
35 | %{__rm} -rf $RPM_BUILD_ROOT
|
---|
36 |
|
---|
37 | %files
|
---|
38 | %defattr(-,dploy,dploy)
|
---|
39 | %doc ChangeLog
|
---|
40 | #%doc INSTALL COPYING README AUTHORS NEWS
|
---|
41 | %config(noreplace) %{_sysconfdir}/PBPROJ
|
---|
42 |
|
---|
43 | %pre
|
---|
44 | # Create dploy Account and group if needed
|
---|
45 | grep -qE '^dploy:' /etc/group
|
---|
46 | if [ $? -ne 0 ]; then
|
---|
47 | addgroup dploy
|
---|
48 | fi
|
---|
49 | grep -qE '^dploy:' /etc/passwd
|
---|
50 | if [ $? -ne 0 ]; then
|
---|
51 | adduser dploy dploy
|
---|
52 | fi
|
---|
53 |
|
---|
54 | %post
|
---|
55 | # Open ssh access for dploy account with generated keys
|
---|
56 | mkdir -p ~dploy/.ssh
|
---|
57 | chmod 700 ~dploy/.ssh
|
---|
58 | keyf=~dploy/.ssh/authorized_keys
|
---|
59 | if [ -f $keyf ]; then
|
---|
60 | key=`cut -d' ' -f2 %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub`
|
---|
61 | grep -qE \'$key\' $keyf
|
---|
62 | if [ $? -ne 0 ]; then
|
---|
63 | cat %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub >> $keyf
|
---|
64 | fi
|
---|
65 | else
|
---|
66 | cp %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub $keyf
|
---|
67 | chown dploy:dploy $keyf
|
---|
68 | chmod 600 $keyf
|
---|
69 | fi
|
---|
70 |
|
---|
71 | %changelog
|
---|
72 | PBLOG
|
---|
Note:
See
TracBrowser
for help on using the repository browser.