New package: nbd-3.6.

This commit is contained in:
Juan RP 2014-01-04 11:03:06 +01:00
parent 01c33e79d0
commit 5524fd711c
3 changed files with 65 additions and 0 deletions

33
srcpkgs/nbd/files/config Normal file
View file

@ -0,0 +1,33 @@
[generic]
# The [generic] section is required, even if nothing is specified
# there.
# When either of these options are specified, nbd-server drops
# privileges to the given user and group after opening ports, but
# _before_ opening files.
user = nbd
group = nbd
# Since version 2.9.17, nbd-server will do exports on a name
# basis (the used name is the name of the section in which the
# export is specified). This however required an incompatible
# protocol change. To enable backwards-compatible port-based
# exports, uncomment the following line:
# oldstyle = true
[export1]
exportname = /export/nbd/export1-file
# The following line will be ignored unless the
# "oldstyle = true" line in the generic section above is
# enabled.
#port = 12345
authfile = /export/nbd/export1-authfile
timeout = 30
filesize = 10000000
readonly = false
multifile = false
copyonwrite = false
prerun = dd if=/dev/zero of=%s bs=1k count=500
postrun = rm -f %s
[otherexport]
exportname = /export/nbd/experiment
# The other options are all optional, except this one in case
# the oldstyle option is used in [generic]:
# port = 12346

View file

@ -0,0 +1,10 @@
[Unit]
Description=Network Block Device Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/nbd-server
[Install]
WantedBy=multi-user.target

22
srcpkgs/nbd/template Normal file
View file

@ -0,0 +1,22 @@
# Template file for 'nbd'
pkgname=nbd
version=3.6
revision=1
build_style=gnu-configure
configure_args="--enable-syslog --sbindir=/usr/bin"
hostmakedepends="pkg-config"
makedepends="glib-devel"
system_accounts="nbd"
conf_files="/etc/nbd-server/config"
short_desc="Network Block Device utilities"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://nbd.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/nbd/nbd-${version}.tar.gz"
checksum=56a079fd6252e8efc88a2da16be8be50bf86740a6135747241c9cdbd75191bd5
post_install() {
vinstall ${FILESDIR}/config 644 etc/nbd-server
vinstall ${FILESDIR}/nbd.service 644 usr/lib/systemd/system
vinstall README 644 usr/share/doc/nbd
}