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