From f4a0036e5815eec7c178eb5f21ad9169c96679a2 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sat, 22 Aug 2015 00:58:54 +0100 Subject: sys-firmware/gnuk: Add udev rules Package-Manager: portage-2.2.20.1 --- sys-firmware/gnuk/ChangeLog | 4 ++++ sys-firmware/gnuk/Manifest | 6 ++++-- sys-firmware/gnuk/files/10-stlink.rules | 3 +++ sys-firmware/gnuk/files/60-gnuk.rules | 3 +++ sys-firmware/gnuk/gnuk-1.1.7.ebuild | 12 ++++++++---- 5 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 sys-firmware/gnuk/files/10-stlink.rules create mode 100644 sys-firmware/gnuk/files/60-gnuk.rules (limited to 'sys-firmware/gnuk') diff --git a/sys-firmware/gnuk/ChangeLog b/sys-firmware/gnuk/ChangeLog index a9746ee2..400630dd 100644 --- a/sys-firmware/gnuk/ChangeLog +++ b/sys-firmware/gnuk/ChangeLog @@ -1,3 +1,7 @@ + 21 Aug 2015; Bertrand Jacquin +files/10-stlink.rules, + +files/60-gnuk.rules, gnuk-1.1.7.ebuild: + sys-firmware/gnuk: Add udev rules + *gnuk-1.1.7 (16 Aug 2015) 16 Aug 2015; Bertrand Jacquin +gnuk-1.1.7.ebuild, diff --git a/sys-firmware/gnuk/Manifest b/sys-firmware/gnuk/Manifest index 226840de..0e97ee2f 100644 --- a/sys-firmware/gnuk/Manifest +++ b/sys-firmware/gnuk/Manifest @@ -1,3 +1,5 @@ -EBUILD gnuk-1.1.7.ebuild 2649 SHA256 79cf81a128276c954ff7683067035b7a50e15d09eabab3d31cd64b9c9811cc6b WHIRLPOOL a483d960497828ad6d3ea7b6abe0ddafe7355cf9951b17668717f80ad90a15a2c9562301e19141ba77681faaeaa84030a30a6ad9bc022052a7bdd6fe0aa25060 -MISC ChangeLog 195 SHA256 18aa8bf34075d8be5952d958af1f8ba67d394041d9a15dcaa146292f2b3c9d4d WHIRLPOOL 6d2f05fd5c1f9f7851f80a241cdb1f99203f464577f0d9b40cd62ba56788bb71cdd2c48d563ba272be8027e8e247ec3b1a78ad322f65bdacee0134cb167a0853 +AUX 10-stlink.rules 179 SHA256 8a89aff84d192d270234c9b58229025cdcfd3f5384f864a298d3cfb19b081ea4 WHIRLPOOL 2fba2148444183945f93cd6a0baaccf7e09c887eef245a52c5c17e92e653759e0e66f3a5bd7abae2099d9f2e1f944dd30631f2c1f21356a9424628f92607ab52 +AUX 60-gnuk.rules 193 SHA256 f0077554ddd338a7f5975609c07f86132fc27a944b517c71cc8a60ee1a09fd42 WHIRLPOOL 40d0b3fb8476772251cd85e3b0d6a7b3a38b1bcb1ffe36868a634125bdd7bd51c06aaea9fc7bf2737a888817317973f88d7bc08a2894f900cd0574c653094c3b +EBUILD gnuk-1.1.7.ebuild 2760 SHA256 9b9356043f9a859cfdf7c1b808884f6fbaff7d1f9ad801bec73bbc8cc7653875 WHIRLPOOL 50b671577c3aa52b17e706d77b0fe587ea71f9637ad0439038f20cbb843c9e6b2d5231db8885ce6650daf71f1871d4781aea2c67a90b07d0fce7ac2eac61659e +MISC ChangeLog 354 SHA256 cb91902288b216388186ebb49da5f1d65e341ee91aa63bd26fe97d93fa457e70 WHIRLPOOL ccc6809c84dac391fe42ae2a3ec9ee0d0080dcade76a1d42d56ead102a87a682d23c01a6e315dfe374f41dbd709840807596200bf9c76b11fa1efb60629bdb2f MISC metadata.xml 335 SHA256 9e5ed8f755bc49eb8a0e96b55585a0b5b8f9ee74e1b2d9b71db438d1878dd306 WHIRLPOOL 4b1e0bb69b7ab34954eeb5efa451fcbcb39236eee31d33f2738b36b773d514fffcb3593a00b9993c1e4fdb90b0564bc87391ab3bf3c10c179437873badec4a39 diff --git a/sys-firmware/gnuk/files/10-stlink.rules b/sys-firmware/gnuk/files/10-stlink.rules new file mode 100644 index 00000000..7b4ed313 --- /dev/null +++ b/sys-firmware/gnuk/files/10-stlink.rules @@ -0,0 +1,3 @@ +# From http://www.fsij.org/doc-gnuk/udev-rules.html + +ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="3748", GROUP="tape", MODE="664", SYMLINK+="stlink" diff --git a/sys-firmware/gnuk/files/60-gnuk.rules b/sys-firmware/gnuk/files/60-gnuk.rules new file mode 100644 index 00000000..37c17ffb --- /dev/null +++ b/sys-firmware/gnuk/files/60-gnuk.rules @@ -0,0 +1,3 @@ +# From http://www.fsij.org/doc-gnuk/udev-rules.html + +SUBSYSTEMS=="usb", ATTRS{idVendor}=="234b", ATTRS{idProduct}=="0000", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" diff --git a/sys-firmware/gnuk/gnuk-1.1.7.ebuild b/sys-firmware/gnuk/gnuk-1.1.7.ebuild index faf15421..be75dc29 100644 --- a/sys-firmware/gnuk/gnuk-1.1.7.ebuild +++ b/sys-firmware/gnuk/gnuk-1.1.7.ebuild @@ -4,7 +4,7 @@ EAPI=5 PYTHON_COMPAT=( python{2_7,3_4} ) -inherit git-r3 eutils python-r1 +inherit git-r3 eutils python-r1 udev DESCRIPTION="An Implementation of USB Cryptographic Token for GnuPG" HOMEPAGE="http://www.fsij.org/category/gnuk.html" @@ -17,7 +17,8 @@ KEYWORDS="~amd64" IUSE="debug doc tools" DEPEND="doc? ( dev-python/sphinx )" -RDEPEND="tools? ( +RDEPEND="virtual/udev + tools? ( ${PYTHON_DEPS} dev-python/pyusb[${PYTHON_USEDEP}] dev-python/colorama[${PYTHON_USEDEP}] @@ -43,7 +44,6 @@ src_prepare () { mv tool/stlinkv2.py "tool/${PN}-stlinkv2.py" mv tool/upgrade_by_passwd.py "tool/${PN}-upgrade_by_passwd.py" mv tool/usb_strings.py "tool/${PN}-usb_strings.py" - } src_configure() { @@ -70,7 +70,9 @@ src_compile() { src_install() { insinto "/usr/share/${PN}/firmware" - doins src/build/gnuk.bin + doins "src/build/${PN}.bin" + + udev_dorules "${FILESDIR}/60-${PN}.rules" if use doc ; then dohtml -r doc/_build/html/* @@ -89,6 +91,8 @@ src_install() { python_foreach_impl python_doscript "tool/${PN}-upgrade.py" python_foreach_impl python_doscript "tool/${PN}-upgrade_by_passwd.py" python_foreach_impl python_doscript "tool/${PN}-usb_strings.py" + + udev_dorules "${FILESDIR}/10-stlink.rules" fi dodoc AUTHORS ChangeLog NEWS README THANKS -- cgit v1.2.3