aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2010-06-01 23:16:46 +0800
committerAlex Dupre <ale@FreeBSD.org>2010-06-01 23:16:46 +0800
commit3c3cb528aa2728075dac967e23bc06903dec1f4a (patch)
treeae601ca8ae432b1304faaf22933b0dafe68031a1 /security
parent317438073539fc65b5eb77ceb0347d41ed87bc69 (diff)
downloadfreebsd-ports-gnome-3c3cb528aa2728075dac967e23bc06903dec1f4a.tar.gz
freebsd-ports-gnome-3c3cb528aa2728075dac967e23bc06903dec1f4a.tar.zst
freebsd-ports-gnome-3c3cb528aa2728075dac967e23bc06903dec1f4a.zip
Quantis is a physical random number generator exploiting
an elementary quantum optics process. This port contains the user library and a CLI/GUI application to access such devices. WWW: http://www.idquantique.com/
Diffstat (limited to 'security')
-rw-r--r--security/Makefile1
-rw-r--r--security/quantis/Makefile111
-rw-r--r--security/quantis/distinfo3
-rw-r--r--security/quantis/files/quantis.conf7
-rw-r--r--security/quantis/pkg-descr10
-rw-r--r--security/quantis/pkg-message10
-rw-r--r--security/quantis/pkg-plist17
7 files changed, 159 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 2dde19aad540..af2dbfcb46c4 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -717,6 +717,7 @@
SUBDIR += qca-tls
SUBDIR += qident
SUBDIR += qtfw
+ SUBDIR += quantis
SUBDIR += quantis-kmod
SUBDIR += quintuple-agent
SUBDIR += racoon2
diff --git a/security/quantis/Makefile b/security/quantis/Makefile
new file mode 100644
index 000000000000..7e6002b59459
--- /dev/null
+++ b/security/quantis/Makefile
@@ -0,0 +1,111 @@
+# New ports collection makefile for: quantis
+# Date created: 10 May 2010
+# Whom: Alex Dupre <ale@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= quantis
+DISTVERSION= v10.06.01
+CATEGORIES= security devel java
+MASTER_SITES= http://www.idquantique.com/files/products/quantis/ \
+ ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= ale
+
+MAINTAINER= ale@FreeBSD.org
+COMMENT= Libraries and utilities to access Quantis devices
+
+OPTIONS= PCI "Enable Quantis PCI support (FreeBSD >= 7.0)" on \
+ USB "Enable Quantis USB support (FreeBSD >= 8.1)" on \
+ JAVA "Enable Java support" on \
+ COMPAT "Build API v1 compatibility libraries" off \
+ TOOL "Build EasyQuantis application" on \
+ GUI "Build QT4 GUI for EasyQuantis application" on
+
+LICENSE_COMB= dual
+LICENSE= BSD GPLv2
+LICENSE_FILE= ${WRKSRC}/Quantis-${DISTVERSION}/License.txt
+
+USE_ZIP= yes
+EXTRACT_BEFORE_ARGS= -aqo
+USE_CMAKE= yes
+USE_QT_VER= 4
+USE_LDCONFIG= yes
+
+WRKSRC= ${WRKDIR}/Quantis-${DISTVERSION}/Libs-Apps
+
+KMODDIR?= /boot/modules
+
+PORTDOCS= *
+PORTEXAMPLES= *
+
+.if defined(WITH_DEBUG)
+CMAKE_BUILD_TYPE=Debug
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_PCI) && ${OSVERSION} >= 700000
+RUN_DEPENDS+= ${KMODDIR}/quantis.ko:${PORTSDIR}/security/quantis-kmod
+.else
+CMAKE_ARGS+= -DDISABLE_QUANTIS_PCI=1
+.endif
+
+.if defined(WITHOUT_USB) || ${OSVERSION} < 801000
+CMAKE_ARGS+= -DDISABLE_QUANTIS_USB=1
+.endif
+
+.if defined(WITH_JAVA)
+USE_JAVA= yes
+JAVA_VERSION= 1.5+
+JAVA_OS= native
+.else
+CMAKE_ARGS+= -DDISABLE_QUANTIS_JAVA=1
+.endif
+
+.if defined(WITH_COMPAT)
+CMAKE_ARGS+= -DENABLE_QUANTIS_COMPAT=1
+
+PLIST_SUB+= COMPAT=""
+.else
+PLIST_SUB+= COMPAT="@comment "
+.endif
+
+.if defined(WITH_TOOL)
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libboost_date_time.a:${PORTSDIR}/devel/boost-libs
+CXXFLAGS+= -I${LOCALBASE}/include
+
+. if defined(WITH_GUI)
+QT_COMPONENTS+= gui moc_build uic_build rcc_build qmake_build
+. else
+CMAKE_ARGS+= -DDISABLE_EASYQUANTIS_GUI=1
+. endif
+
+PLIST_SUB+= TOOL=""
+.else
+CMAKE_ARGS+= -DDISABLE_EASYQUANTIS=1
+
+PLIST_SUB+= TOOL="@comment "
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} '/ if(CMAKE_COMPILER_IS_GNU/s/)/ MATCHES "0")/' \
+ ${WRKSRC}/CMake/CompilersFlags.cmake
+
+post-install:
+.if !defined(WITHOUT_PORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/../*.txt ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/../User_Manual.pdf ${DOCSDIR}
+.endif
+.if !defined(WITHOUT_PORTEXAMPLES)
+ @${MKDIR} ${EXAMPLESDIR}
+ @(cd ${WRKSRC}/../Samples; ${COPYTREE_SHARE} . ${EXAMPLESDIR})
+.if defined(WITH_USB) && ${OSVERSION} >= 801000
+ @${MKDIR} ${EXAMPLESDIR}/devd
+ ${INSTALL_DATA} ${FILESDIR}/quantis.conf ${EXAMPLESDIR}/devd
+ @${CAT} ${PKGMESSAGE}
+.endif
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/security/quantis/distinfo b/security/quantis/distinfo
new file mode 100644
index 000000000000..d2fbc8709c0c
--- /dev/null
+++ b/security/quantis/distinfo
@@ -0,0 +1,3 @@
+MD5 (quantis-v10.06.01.zip) = 56b307d4f6930356adbe8d91d4c7a5a0
+SHA256 (quantis-v10.06.01.zip) = 7992d65990c3c174f5e579e6d6555dc6fc42dc53b2dd7110bd637d706d4f4953
+SIZE (quantis-v10.06.01.zip) = 1160026
diff --git a/security/quantis/files/quantis.conf b/security/quantis/files/quantis.conf
new file mode 100644
index 000000000000..d2826eb2347d
--- /dev/null
+++ b/security/quantis/files/quantis.conf
@@ -0,0 +1,7 @@
+# Quantis USB RNG
+attach 100 {
+ device-name "ugen[0-9\.]+";
+ match "vendor" "0x0aba";
+ match "product" "0x0102";
+ action "/bin/chmod 666 /dev/$device-name";
+};
diff --git a/security/quantis/pkg-descr b/security/quantis/pkg-descr
new file mode 100644
index 000000000000..bce54d042fbd
--- /dev/null
+++ b/security/quantis/pkg-descr
@@ -0,0 +1,10 @@
+Quantis is a physical random number generator exploiting
+an elementary quantum optics process.
+
+This port contains the user library and a CLI/GUI application
+to access such devices.
+
+WWW: http://www.idquantique.com/
+
+- Alex Dupre
+ale@FreeBSD.org
diff --git a/security/quantis/pkg-message b/security/quantis/pkg-message
new file mode 100644
index 000000000000..7da2653dcdec
--- /dev/null
+++ b/security/quantis/pkg-message
@@ -0,0 +1,10 @@
+************************************************************
+
+To give Quantis USB access to other users than 'root',
+you have to change permissions on the generated 'ugen'
+device.
+
+A devd config sample has been put in the examples directory.
+Copy it into /usr/local/etc/devd ad modify it at your needs.
+
+************************************************************
diff --git a/security/quantis/pkg-plist b/security/quantis/pkg-plist
new file mode 100644
index 000000000000..ca073f6c83e4
--- /dev/null
+++ b/security/quantis/pkg-plist
@@ -0,0 +1,17 @@
+%%TOOL%%bin/EasyQuantis
+lib/libQuantis-NoHw.a
+lib/libQuantis-NoHw.so
+lib/libQuantis-NoHw.so.2
+lib/libQuantis-NoHw.so.2.3.0
+lib/libQuantis.a
+lib/libQuantis.so
+lib/libQuantis.so.2
+lib/libQuantis.so.2.3.0
+%%COMPAT%%lib/libQuantisPci-Compat.a
+%%COMPAT%%lib/libQuantisPci-Compat.so
+%%COMPAT%%lib/libQuantisPci-Compat.so.2
+%%COMPAT%%lib/libQuantisPci-Compat.so.2.3.0
+%%COMPAT%%lib/libQuantisUsb-Compat.a
+%%COMPAT%%lib/libQuantisUsb-Compat.so
+%%COMPAT%%lib/libQuantisUsb-Compat.so.2
+%%COMPAT%%lib/libQuantisUsb-Compat.so.2.3.0