source: ProjectBuilder/projects/dploy/devel/dploy-common/rpm/dploy-common.spec@ 388

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
5Summary: dploy.org common tools
6Summary(fr): Outils communs pour dploy.org
7
8Name: PBPKG
9Version: PBVER
10Release: PBTAGPBSUF
11License: GPL
12Group: PBGRP
13Url: PBURL
14Source: PBSRC
15BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
16Requires: openssh, PBDEP
17
18%description
19PBDESC
20
21%description -l fr
22Outils communs pour dploy.org
23
24%prep
25%setup -q
26
27%install
28%{__rm} -rf $RPM_BUILD_ROOT
29export DESTDIR=$RPM_BUILD_ROOT
30export PREFIX=%{_exec_prefix}
31export 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
45grep -qE '^dploy:' /etc/group
46if [ $? -ne 0 ]; then
47 addgroup dploy
48fi
49grep -qE '^dploy:' /etc/passwd
50if [ $? -ne 0 ]; then
51 adduser dploy dploy
52fi
53
54%post
55# Open ssh access for dploy account with generated keys
56mkdir -p ~dploy/.ssh
57chmod 700 ~dploy/.ssh
58keyf=~dploy/.ssh/authorized_keys
59if [ -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
65else
66 cp %{_sysconfdir}/PBPROJ/keys/dploy_id_dsa.pub $keyf
67 chown dploy:dploy $keyf
68 chmod 600 $keyf
69fi
70
71%changelog
72PBLOG
Note: See TracBrowser for help on using the repository browser.