Browse Source

Add Arch Linux build script

master
Pekka Helenius 4 years ago
parent
commit
96e4232e41
2 changed files with 66 additions and 0 deletions
  1. +44
    -0
      arch_linux/PKGBUILD
  2. +22
    -0
      arch_linux/pamusb-agent.service

+ 44
- 0
arch_linux/PKGBUILD View File

@ -0,0 +1,44 @@
# Maintainer: Pekka Helenius <fincer89 [at] hotmail [dot] com>
pkgname=pam_usb
pkgver=1
pkgrel=1
pkgdesc='Hardware authentication for Linux using ordinary USB Flash Drives.'
arch=('any')
url='http://www.pamusb.org/'
license=('GPLv2')
depends=('pam' 'dbus' 'python' 'python-dbus' 'python-lxml' 'python-gobject' 'udisks2')
makedepends=('git' 'pkgconf' 'gcc' 'make' 'patch')
options=(!emptydirs)
backup=(
"etc/security/pam_usb.conf"
)
source=(
"git+https://github.com/Fincer/${pkgname}.git"
# "git+https://github.com/aluzzardi/${pkgname}.git"
"pamusb-agent.service"
)
sha256sums=(
'SKIP'
'6002172ffe9d51988116c9e2f34b65d3cb6c29d26cdbd4831d6307a711af7bb9'
)
pkgver() {
cd $pkgname
if [[ $(git describe) ]]; then
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
else
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
fi
}
build() {
cd $pkgname
make all
}
package() {
cd $pkgname
make DESTDIR=${pkgdir} PAM_USB_DEST=${pkgdir}/usr/lib/security install
install -Dt ${pkgdir}/usr/lib/systemd/system -m0644 ../pamusb-agent.service
}

+ 22
- 0
arch_linux/pamusb-agent.service View File

@ -0,0 +1,22 @@
[Unit]
Description=USB PAM authentication agent
#Wants=user.slice
#After=user.slice
After=dbus.service
[Service]
ExecStart=/usr/bin/pamusb-agent
Restart=always
RestartSec=0
ProtectKernelModules=True
ProtectKernelTunables=True
ProtectClock=True
ProtectHostname=True
NoNewPrivileges=True
ProtectSystem=strict
PrivateTmp=True
ProtectControlGroups=true
[Install]
WantedBy=multi-user.target

Loading…
Cancel
Save