Provide some vars for use in template's targets.
These new vars are DESTDIR (by default XBPS_DESTDIR/pkgname-version), SRCPKGDESTDIR (XBPS_DESTDIR/sourcepkg-version) and FILESDIR (XBPS_TEMPLATESDIR/pkgname/files). This simplifies packages that used them. --HG-- extra : convert_revision : 287ea7128cb5df19870ca7aff0a3b8f99a11d63a
This commit is contained in:
@@ -14,21 +14,18 @@ Add_dependency run openssh
|
||||
|
||||
do_install()
|
||||
{
|
||||
local destdir=${XBPS_DESTDIR}/${pkgname}-${version}
|
||||
local origdir=${XBPS_DESTDIR}/${sourcepkg}-${version}
|
||||
|
||||
mkdir -p ${destdir}/usr/bin
|
||||
mkdir -p ${destdir}/etc/ssh
|
||||
mkdir -p ${destdir}/usr/share/man/man1
|
||||
mkdir -p ${destdir}/usr/share/man/man5
|
||||
mkdir -p ${DESTDIR}/usr/bin
|
||||
mkdir -p ${DESTDIR}/etc/ssh
|
||||
mkdir -p ${DESTDIR}/usr/share/man/man1
|
||||
mkdir -p ${DESTDIR}/usr/share/man/man5
|
||||
for f in scp sftp slogin ssh ssh-add ssh-agent \
|
||||
ssh-copy-id ssh-keyscan findssl; do
|
||||
mv ${origdir}/usr/bin/${f} ${destdir}/usr/bin
|
||||
[ ! -f ${origdir}/usr/share/man/man1/${f}.1 ] && continue
|
||||
mv ${origdir}/usr/share/man/man1/${f}.1 \
|
||||
${destdir}/usr/share/man/man1
|
||||
mv ${SRCPKGDESTDIR}/usr/bin/${f} ${DESTDIR}/usr/bin
|
||||
[ ! -f ${SRCPKGDESTDIR}/usr/share/man/man1/${f}.1 ] && continue
|
||||
mv ${SRCPKGDESTDIR}/usr/share/man/man1/${f}.1 \
|
||||
${DESTDIR}/usr/share/man/man1
|
||||
done
|
||||
mv ${origdir}/etc/ssh/ssh_config ${destdir}/etc/ssh
|
||||
mv ${origdir}/usr/share/man/man5/ssh_config.5 \
|
||||
${destdir}/usr/share/man/man5
|
||||
mv ${SRCPKGDESTDIR}/etc/ssh/ssh_config ${DESTDIR}/etc/ssh
|
||||
mv ${SRCPKGDESTDIR}/usr/share/man/man5/ssh_config.5 \
|
||||
${DESTDIR}/usr/share/man/man5
|
||||
}
|
||||
|
||||
@@ -15,24 +15,21 @@ Add_dependency run openssh
|
||||
|
||||
do_install()
|
||||
{
|
||||
local destdir=${XBPS_DESTDIR}/${pkgname}-${version}
|
||||
local origdir=${XBPS_DESTDIR}/${sourcepkg}-${version}
|
||||
|
||||
mkdir -p ${destdir}/etc/ssh
|
||||
mkdir -p ${destdir}/usr/libexec/openssh
|
||||
mkdir -p ${destdir}/usr/share/man/man5
|
||||
mkdir -p ${destdir}/usr/share/man/man8
|
||||
mv ${origdir}/usr/libexec/openssh/sftp-server \
|
||||
${destdir}/usr/libexec/openssh
|
||||
mv ${origdir}/etc/ssh/sshd_config ${destdir}/etc/ssh
|
||||
mv ${origdir}/usr/sbin ${destdir}/usr
|
||||
mv ${origdir}/usr/share/man/man5/sshd_config.5 \
|
||||
${destdir}/usr/share/man/man5
|
||||
mkdir -p ${DESTDIR}/etc/ssh
|
||||
mkdir -p ${DESTDIR}/usr/libexec/openssh
|
||||
mkdir -p ${DESTDIR}/usr/share/man/man5
|
||||
mkdir -p ${DESTDIR}/usr/share/man/man8
|
||||
mv ${SRCPKGDESTDIR}/usr/libexec/openssh/sftp-server \
|
||||
${DESTDIR}/usr/libexec/openssh
|
||||
mv ${SRCPKGDESTDIR}/etc/ssh/sshd_config ${DESTDIR}/etc/ssh
|
||||
mv ${SRCPKGDESTDIR}/usr/sbin ${DESTDIR}/usr
|
||||
mv ${SRCPKGDESTDIR}/usr/share/man/man5/sshd_config.5 \
|
||||
${DESTDIR}/usr/share/man/man5
|
||||
for f in sftp-server sshd; do
|
||||
mv ${origdir}/usr/share/man/man8/${f}.8 \
|
||||
${destdir}/usr/share/man/man8
|
||||
mv ${SRCPKGDESTDIR}/usr/share/man/man8/${f}.8 \
|
||||
${DESTDIR}/usr/share/man/man8
|
||||
done
|
||||
mv ${origdir}/etc/pam.d ${destdir}/etc
|
||||
mv ${origdir}/etc/rc.d ${destdir}/etc
|
||||
mv ${origdir}/var ${destdir}
|
||||
mv ${SRCPKGDESTDIR}/etc/pam.d ${DESTDIR}/etc
|
||||
mv ${SRCPKGDESTDIR}/etc/rc.d ${DESTDIR}/etc
|
||||
mv ${SRCPKGDESTDIR}/var ${DESTDIR}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Template file for 'openssh'
|
||||
pkgname=openssh
|
||||
sourcepkg=openssh
|
||||
sourcepkg=$pkgname
|
||||
version=5.2p1
|
||||
distfiles="
|
||||
http://sunsite.rediris.es/pub/OpenBSD/OpenSSH/portable/$pkgname-$version.tar.gz"
|
||||
@@ -43,21 +43,19 @@ Add_dependency build tcp_wrappers
|
||||
|
||||
post_install()
|
||||
{
|
||||
local destdir=$XBPS_DESTDIR/$pkgname-$version
|
||||
|
||||
install -D -m644 ${wrksrc}/contrib/sshd.pam.generic \
|
||||
${destdir}/etc/pam.d/sshd
|
||||
${DESTDIR}/etc/pam.d/sshd
|
||||
install -D -m755 ${wrksrc}/contrib/findssl.sh \
|
||||
${destdir}/usr/bin/findssl
|
||||
${DESTDIR}/usr/bin/findssl
|
||||
install -D -m755 ${wrksrc}/contrib/ssh-copy-id \
|
||||
${destdir}/usr/bin/ssh-copy-id
|
||||
${DESTDIR}/usr/bin/ssh-copy-id
|
||||
install -D -m644 ${wrksrc}/contrib/ssh-copy-id.1 \
|
||||
${destdir}/usr/share/man/man1/ssh-copy-id.1
|
||||
install -D -m755 ${FILESDIR}/sshd ${destdir}/etc/rc.d/sshd
|
||||
${DESTDIR}/usr/share/man/man1/ssh-copy-id.1
|
||||
install -D -m755 ${FILESDIR}/sshd ${DESTDIR}/etc/rc.d/sshd
|
||||
|
||||
sed -i \
|
||||
-e 's|^#ListenAddress 0.0.0.0|ListenAddress 0.0.0.0|g' \
|
||||
-e 's|^#UsePAM no|UsePAM yes|g' \
|
||||
-e 's|^#ChallengeResponseAuthentication yes|ChallengeResponseAuthentication no|g' \
|
||||
${destdir}/etc/ssh/sshd_config
|
||||
${DESTDIR}/etc/ssh/sshd_config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user