Add net-misc/haspd ebuild

atratsevskiy
Dmitry 'daks' Fomenko 13 years ago
parent d9c318e26c
commit c6d229e4ae

@ -0,0 +1,7 @@
# ChangeLog for app-office/1C_Enterprise-server
# Copyright 2002-2011 Gentoo Foundation; Distributed under the GPL v2
*net-misc/haspd-3.2.7.ebuild
20 Sep 2011; Dmitry 'daks' Fomenko <daks12@gmail.com>
Initial import. Based on JohnRDoe63 <johnrdoe63@cregion.ru> ebuild.

@ -0,0 +1,16 @@
AUX aksusbd 383 RMD160 5e4dd6dd7e7178ad3520bb5323797e45dca32cb9 SHA1 df82ad017c42fd3c70865ea45fe4068c8bedd2d1 SHA256 1f504bd78e5db33e42e2e811d5b640dfe1c3900c69f17c4979c0694b379330ec
AUX aksusbd.conf 414 RMD160 0467da94aac8a29d5bdc398083f9253df213f580 SHA1 67a0d62a3ea87ac53b7ad753b6ab04924d7768c1 SHA256 d22e74e2402c6642076ae226489d3097344772554d2e40453949e4f7b61593e3
AUX hasplm 434 RMD160 a9f15bd3b7e95881831c377bbaaedd0b75fd5754 SHA1 bd9785dbad3ab6c63500b458460c1de25eed62c4 SHA256 a271e704d3df657246fec0d2ed6d9a7efd5e93c965399ee59bc5e400744cb0bd
AUX hasplm.conf 40 RMD160 a54578ba61ba3ca0e96fa23316eb78862cad8964 SHA1 6948619ad310b9f9403e2fc7b883e0568671917b SHA256 747eb34352d12413c9d4780d8acb26c678411d2c7a629331154bca74fb9fa51f
AUX hasplmd 413 RMD160 ec00c9e0c14cdb289d1609fe1630dd2875f62feb SHA1 88a9681c62cbbeda4068dc3c04f82c63932c1145 SHA256 c134fa2e8bea2fb513187f139f17b2944589392cfb671acd826f4d2badafb182
AUX hasplmd.conf 18 RMD160 7f5bc5aa17183ac2b6da6e4ccedfee31d8d999f9 SHA1 11ec0bf20617e7b9cfca07256980254fa8297d5b SHA256 3ad79d5be0651ed26b6da361d0146f92bdfcb2fe479196423e94b7ce617b21a2
AUX sentinel 608 RMD160 50abb61e71c4956415125b8963d610a76b470979 SHA1 4ba61570bfaa6b2d4a504590e90de29991524c90 SHA256 722dedf342298a85ec71bafbae41f839b6563f692544dffbf95ee3edd43fbdd7
AUX skeyd 429 RMD160 c110d782ea820247f313d9e370fb2c2d2fd0b9ae SHA1 7490db5695af20f4eece68ede9cb16ce6497c329 SHA256 5f4ce3e222f3bf2187667b8530c9867eac2e33fcd8334b4563e36b1bc65ecd2d
AUX skeyd.conf 71 RMD160 efd7f74ebf85375263a437f8ef4377dd465980ed SHA1 c787f9a7c634ff128902aceb36fdf14a0e3c27e4 SHA256 5abf627105917fcf28692fe51242c30f1c32ad692d133cc4e273f6fb4747a593
AUX winehasp 415 RMD160 7b446b4ba0446251c5e656f1c31c0d7951f9070c SHA1 8c77f9657aaf3a3a78f59254438682dbd7c3b76a SHA256 e09735c2461c581fed40090dc48df53790af8ee4ebdd69b1498a790bbb0835d2
AUX winehasp.conf 114 RMD160 08a894fbe24b8232a87d0749e168653eaa15b1b5 SHA1 d2588dc943859ad353d0116147c1ef1195a0a8f2 SHA256 063395a11f91ae44f3deb738761fa0eb1956ef844da3d76b8ee11c1235325710
DIST haspd-3.2-eter7gentoo.i586.tar.bz2 2196751 RMD160 968aa257b81d42d94a14f084f4b9cc91fa166e63 SHA1 219618cc0027cbe2674494be0dd249d963d81ab7 SHA256 3b2ff09d260238f90655ae83ff2b54ff3a7295aa580e184fbcc4b1407b49f406
DIST haspd-modules-3.2-eter7gentoo.i586.tar.bz2 56625 RMD160 8238d7ba92b6c8630611d804d9a32736debeb61a SHA1 a2b527a03cec03118048b3bad3f4bef136e82e0f SHA256 16fc89998647ab1ff92ba488d0ac47752f0176944f33e67be4ca0e655bf710da
EBUILD haspd-3.2.7.ebuild 3289 RMD160 9aa3851096abf0ea656aa50ff9444e605f7f12be SHA1 24221ccc8ecd0750bdc084246b7afa9cc5bde0d1 SHA256 4b9d5ad34d4c0e174e7ea84c81f76b984eee958b30f14dd2e5f8c7722a0f60c8
MISC ChangeLog 275 RMD160 5298eab9ebf4a9bd483f5c5c47d23aaa317ab4d7 SHA1 4a35f0aafd10967f78dfa50751318ea3b7034732 SHA256 c27bd29d388fc8edbf75ac585e9b70e601eb0b95291cc9efe4469d221ae0cb26
MISC metadata.xml 746 RMD160 7ccaa81b3ed47626fedc3027c5bd6f1b406ba2f6 SHA1 6220818e663243d45bf0e956e563a3c1e62a60ed SHA256 d465c4900e79f69c30561341127c0adcf03e34405b9b89b1f30518a9f3dcaad4

@ -0,0 +1,17 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
start() {
ebegin "Starting HARDLOCK daemon"
eval start-stop-daemon --start --quiet --exec /opt/sbin/aksusbd -- ${AKSUSBD_ARGS}
eend $?
}
stop() {
ebegin "Stopping HARDLOCK daemon"
start-stop-daemon --stop --quiet --exec /opt/sbin/aksusbd
eend $?
}

@ -0,0 +1,7 @@
# -l <level> sets logging level: [0] errors only [1] normal [2] verbose [3] ultra verbose
# -q <entries> sets the length of the work queue (default: 64)
# -s <file> sets the communication socket file name
# -u <mask> sets the communication socket file access rights
# -d <millisec> sets the delay after plugging in a key until it is accessed for the first time (0 - 2000)
AKSUSBD_ARGS="-l 2 -u 0666"

@ -0,0 +1,20 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend () {
need net
after aksusbd
}
start() {
ebegin "Starting HASP License manager"
eval start-stop-daemon --start --quiet --exec /opt/sbin/hasplm -- ${HASPLM_ARGS}
eend $?
}
stop() {
ebegin "Stopping HASP License manager"
start-stop-daemon --stop --quiet --exec /opt/sbin/hasplm
eend $?
}

@ -0,0 +1 @@
HASPLM_ARGS="-c /etc/haspd/hasplm.conf"

@ -0,0 +1,20 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend () {
need net
after hasplmd
}
start() {
ebegin "Starting HASP SRM"
eval start-stop-daemon --start --quiet --exec /opt/sbin/hasplmd -- ${HASPLMD_ARGS}
eend $?
}
stop() {
ebegin "Stopping HASP SRM"
start-stop-daemon --stop --quiet --exec /opt/sbin/hasplmd
eend $?
}

@ -0,0 +1,22 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend () {
need net
after aksusbd
}
start() {
ebegin "Starting Sentinel keys daemon"
eval start-stop-daemon --start --quiet --exec /opt/lib/sentinel/usbsentinel
eval start-stop-daemon --start --quiet --exec /opt/lib/sentinel/SntlKeysSrvrlnx
eend $?
}
stop() {
ebegin "Stopping Sentinel keys daemon"
eval start-stop-daemon --stop --quiet --exec /opt/lib/sentinel/usbsentinel
eval start-stop-daemon --stop --quiet --exec /opt/lib/sentinel/SntlKeysSrvrlnx
eend $?
}

@ -0,0 +1,20 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend () {
need net
after aksusbd
}
start() {
ebegin "Starting Smartkey 3 USB/LPT driver"
eval start-stop-daemon --start --quiet --exec /opt/sbin/skeyd
eend $?
}
stop() {
ebegin "Starting Smartkey 3 USB/LPT driver"
eval start-stop-daemon --stop --quiet --exec /opt/sbin/skeyd
eend $?
}

@ -0,0 +1,3 @@
# -c, --conf Use the alternate configuration file.
SKEYD_ARGS=""

@ -0,0 +1,20 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend () {
need net
after aksusbd
}
start() {
ebegin "Starting Wine HASP support"
eval start-stop-daemon --start --quiet --exec /opt/sbin/winehasp
eend $?
}
stop() {
ebegin "Stopping Wine HASP support"
start-stop-daemon --stop --quiet --exec /opt/sbin/winehasp
eend $?
}

@ -0,0 +1,5 @@
# -p <port> specify port used
# -user <user> run as user
# -u <user> run as user
WINEHASP_ARGS=""

@ -0,0 +1,127 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# : $
EAPI="4"
inherit versionator linux-info
MY_R=eter$(get_version_component_range 3)gentoo
DESCRIPTION="HASP drivers and license managers"
HOMEPAGE=http://www.etersoft.ru
BASE_URI=ftp://updates.etersoft.ru/pub/Etersoft/WINE@Etersoft/last/HASP/Gentoo/2009/
SRC_URI="${BASE_URI}/${PN}-$(get_version_component_range 1-2)-${MY_R}.i586.tar.bz2
lpt-hasp? ( ${BASE_URI}/${PN}-modules-$(get_version_component_range 1-2)-${MY_R}.i586.tar.bz2 )"
LICENSE=Proprietary
SLOT="0"
KEYWORDS="-* x86 amd64"
IUSE="-lpt-hasp -sentinel -skey +wine"
S="${WORKDIR}"
QA_EXECSTACK="usr/src/aksparlnx-3.2/api.o_shipped.x86
opt/sbin/nethaspdemo
opt/sbin/skeymon
opt/sbin/aksusbd
opt/sbin/hasplmd
opt/sbin/haspdemo
opt/sbin/skeyd
"
QA_PRESTRIPPED="/opt/sbin/skeymon
/opt/sbin/aksusbd
/opt/sbin/hasplmd
/opt/sbin/skeyd
/opt/sbin/hasplm
/opt/sbin/winehasp
/opt/lib/sentinel/libMD5CHAP.so
/opt/lib/sentinel/libcrypto.so.0.9.7
/opt/lib/sentinel/libusb-0.1.so.4
/opt/lib/sentinel/SntlKeysSrvrlnx
/opt/lib/sentinel/PwdGenUtility
/opt/lib/sentinel/libssl.so
/opt/lib/sentinel/usbsentinel
"
pkg_pretend() {
linux-info_pkg_setup
if ! linux_config_exists || ! linux_chkconfig_present USB_DEVICEFS; then
echo
ewarn "You have to use kernle with CONFIG_USB_DEVICEFS enabled"
ewarn " Device Drivers --->"
ewarn " USB support --->"
ewarn " [*] USB device filesystem"
die "Kernel configuration error"
fi
if [[ ! -f /proc/bus/usb/devices ]]; then
ewarn "Before use hasp drivers you have to mount usbfs filesystem into /proc/bus/usb"
ewarn "e.g.: mount -t usbfs usbfs /proc/bus/usb -o rw,noexec,nosuid,devmode=0664,devgid=85"
fi
if ! linux_config_exists || ! linux_chkconfig_present && use lpt-hasp; then
eerror "You have to use kernel with PARPORT_PC enabled"
eerror " Device Drivers --->"
eerror " <*> Parallel port support --->"
eerror " <*> PC-style hardware"
die "Kernel configuration error"
fi
}
src_install() {
insopts -m0755
if use wine; then
doinitd "${FILESDIR}"/winehasp
else
rm -f ${S}/usr/sbin/winehasp
fi
if use sentinel; then
doinitd "${FILESDIR}"/sentinel
insinto /opt
doins -r ${S}/usr/lib*
fi
if use lpt-hasp; then
insinto /usr
doins -r ${S}/usr/src*
fi
insinto /etc
for i in aksusbd hasplm hasplmd; do
doinitd "${FILESDIR}"/${i}
done
if use skey; then
insinto /etc
insopts -m0664
doins "${S}"/etc/skeyd.conf
doman ${S}/usr/share/man/man1/*
doman ${S}/usr/share/man/man5/*
newconfd "${FILESDIR}"/skeyd.conf skeyd
insopts -m755
doinitd "${FILESDIR}"/skeyd
else
rm -rf ${WORKDIR}/sbin/skeyd || die "TEST"
fi
insinto /opt
doins -r ${S}/usr/sbin*
insopts -m664
newconfd "${FILESDIR}"/aksusbd.conf aksusbd
newconfd "${FILESDIR}"/hasplmd.conf hasplmd
newconfd "${FILESDIR}"/hasplm.conf haspml
newconfd "${FILESDIR}"/winehasp.conf winehasp
insinto /etc/haspd
doins "${S}"/etc/haspd/hasplm.conf
#exit 1
}
pkg_postinst() {
if [[ ! -c "${ROOT}"/dev/Hardlock ]]; then
ebegin "Creating Hardlock dev file"
mknod ${ROOT}/dev/Hardlock c 42 0
chmod 0666 ${ROOT}/dev/Hardlock
eend $?
fi
}

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
<email>daks12@gmail.com</email>
<name>Dmitry 'daks' Fomenko</name>
</maintainer>
<longdescription lang="ru">
Драйверы поддержки LPT и USB ключей HASP.
</longdescription>
<longdescription>
Drivers for LPT and USB HASP keys.
</longdescription>
<use>
<flag name='lpt-hasp'>Install source code of the LPT HASP driver aksparlnx</flag>
<flag name='skey'>Install Eutron Smartkey 3 USB/LPT driver</flag>
<flag name='sentinel'>Install SafeNet Sentinel driver</flag>
<flag name='wine'>Install HASP keys support for wine</flag>
</use>
</pkgmetadata>
Loading…
Cancel
Save