diff --git a/mrmShared/linux/README.md b/mrmShared/linux/README.md index 1e6c2c98..12bcb98c 100644 --- a/mrmShared/linux/README.md +++ b/mrmShared/linux/README.md @@ -21,3 +21,15 @@ To create an installable dksm package for this kernel module do the following: 1. Edit dkms/CONFIG to specify the group name for the target user 2. Run make in the dkms directory 3. Install the generated .rpm on your target system + +# debian + +On this folder runs: + +dpkg-buildpackage + +or + +dpkg-buildpackage -b -uc -us # Not signing the package + +A .deb package will be gerated one folder above. diff --git a/mrmShared/linux/debian/changelog b/mrmShared/linux/debian/changelog new file mode 100644 index 00000000..e10fef0c --- /dev/null +++ b/mrmShared/linux/debian/changelog @@ -0,0 +1,5 @@ +mrf-dkms (3-0) unstable; urgency=medium + + * Initial package + + -- Gabriel Fedel Thu, 15 Feb 2024 13:12:59 +0100 diff --git a/mrmShared/linux/debian/compat b/mrmShared/linux/debian/compat new file mode 100644 index 00000000..f599e28b --- /dev/null +++ b/mrmShared/linux/debian/compat @@ -0,0 +1 @@ +10 diff --git a/mrmShared/linux/debian/control b/mrmShared/linux/debian/control new file mode 100644 index 00000000..1978d724 --- /dev/null +++ b/mrmShared/linux/debian/control @@ -0,0 +1,13 @@ +Source: mrf-dkms +Section: devel +Priority: extra +Maintainer: Gabriel Fedel +Build-Depends: debhelper (>= 9),dkms + +Package: mrf-dkms +Architecture: all +Depends: ${misc:Depends}, +Description: Kernel driver for MRF timing cards. + Installs the kernel driver for interfacing to the + Micro Research Finland (MRF) timing cards over PCI/PCIe. + The driver is installed using dkms. diff --git a/mrmShared/linux/debian/copyright b/mrmShared/linux/debian/copyright new file mode 100644 index 00000000..a9e9d964 --- /dev/null +++ b/mrmShared/linux/debian/copyright @@ -0,0 +1,86 @@ + +It was downloaded from https://github.com/epics-modules/mrfioc2 + +Upstream Authors: + + Michael Davidsaver + Jerzy Jamroz + Jure Krasna + Hinko Kocevar + Michael Abbott + Dirk Zimoch + Tom Slejko + Jeong Han Lee + +Copyright: + + Copyright (c) 2015 Brookhaven Science Associates as operator of + Brookhaven National Lab + Copyright (c) 2016 Michael Davidsaver + +License: + + mrfioc2 is distributed subject to the following license conditions: + SOFTWARE LICENSE AGREEMENT + Software: mrfioc2 + + 1. The "Software", below, refers to mrfioc2 (in either source code, or + binary form and accompanying documentation). Each licensee is addressed + as "you" or "Licensee." + + 2. The copyright holders shown above and their third-party licensors hereby + grant Licensee a royalty-free nonexclusive license, subject to the + limitations stated herein and U.S. Government license rights. + + 3. You may modify and make a copy or copies of the Software for use within + your organization, if you meet the following conditions: + 1. Copies in source code must include the copyright notice and this + Software License Agreement. + 2. Copies in binary form must include the copyright notice and this + Software License Agreement in the documentation and/or other + materials provided with the copy. + + 4. You may modify a copy or copies of the Software or any portion of it, thus + forming a work based on the Software, and distribute copies of such work + outside your organization, if you meet all of the following conditions: + 1. Copies in source code must include the copyright notice and this + Software License Agreement; + 2. Copies in binary form must include the copyright notice and this + Software License Agreement in the documentation and/or other + materials provided with the copy; + 3. Modified copies and works based on the Software must carry + prominent notices stating that you changed specified portions of + the Software. + + 5. Portions of the Software resulted from work developed under a + U.S. Government contract and are subject to the following license: + the Government is granted for itself and others acting on its behalf a + paid-up, nonexclusive, irrevocable worldwide license in this computer + software to reproduce, prepare derivative works, and perform publicly and + display publicly. + + 6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF + ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE UNITED + STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR EMPLOYEES: (1) + DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY + OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE + SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT + INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL + FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE + CORRECTED. + + 7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR + THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF + ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, + CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, + INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY + REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF + CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, + EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE POSSIBILITY OF SUCH + LOSS OR DAMAGES. + + +The Debian packaging is (C) 2023, Gabriel Fedel and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/mrmShared/linux/debian/mrf-dkms.dkms b/mrmShared/linux/debian/mrf-dkms.dkms new file mode 100644 index 00000000..cf2a77c1 --- /dev/null +++ b/mrmShared/linux/debian/mrf-dkms.dkms @@ -0,0 +1,6 @@ +PACKAGE_NAME="mrf" +PACKAGE_VERSION="#MODULE_VERSION#" +BUILT_MODULE_NAME[0]="$PACKAGE_NAME" +DEST_MODULE_LOCATION[0]="/updates/dkms/" +AUTOINSTALL="yes" +REMAKE_INITRD=NO diff --git a/mrmShared/linux/debian/mrf-dkms.udev b/mrmShared/linux/debian/mrf-dkms.udev new file mode 100644 index 00000000..ee2b8ec3 --- /dev/null +++ b/mrmShared/linux/debian/mrf-dkms.udev @@ -0,0 +1,2 @@ +# UDEV rule giving access to MRF device +KERNEL=="uio*", ATTR{name}=="mrf-pci", GROUP="mrf", MODE="0660" diff --git a/mrmShared/linux/debian/rules b/mrmShared/linux/debian/rules new file mode 100755 index 00000000..ce9ef2a2 --- /dev/null +++ b/mrmShared/linux/debian/rules @@ -0,0 +1,28 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 + +include /usr/share/dpkg/pkg-info.mk + +%: + dh $@ --with dkms + +override_dh_install: + dh_install *.c usr/src/mrf-$(DEB_VERSION_UPSTREAM)/ + dh_install *.h usr/src/mrf-$(DEB_VERSION_UPSTREAM)/ + dh_install K* usr/src/mrf-$(DEB_VERSION_UPSTREAM)/ + dh_install Makefile usr/src/mrf-$(DEB_VERSION_UPSTREAM)/ + dh_install patchize.sh usr/src/mrf-$(DEB_VERSION_UPSTREAM)/ + dh_install README.md usr/src/mrf-$(DEB_VERSION_UPSTREAM)/ + dh_install debian/mrf-dkms.udev usr/src/mrf-$(DEB_VERSION_UPSTREAM)/50-mrf.rules + +override_dh_dkms: + dh_dkms -V $(DEB_VERSION_UPSTREAM) + +override_dh_auto_configure: +override_dh_auto_build: +override_dh_auto_test: +override_dh_auto_install: +override_dh_auto_clean: +override_dh_installudev: + dh_installudev --priority=50