summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorjcorgan2009-07-14 17:17:45 +0000
committerjcorgan2009-07-14 17:17:45 +0000
commit09a2e8374e5ca4abbcdc8b872244756ce774dab3 (patch)
tree94a96b87356bd30c26525428137e1d6c04ebaf93 /debian
parentc51227a80b5e03e2d18f02f8693de97610fe8f00 (diff)
downloadgnuradio-09a2e8374e5ca4abbcdc8b872244756ce774dab3.tar.gz
gnuradio-09a2e8374e5ca4abbcdc8b872244756ce774dab3.tar.bz2
gnuradio-09a2e8374e5ca4abbcdc8b872244756ce774dab3.zip
Reorganization of debian package directory
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11424 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/bin/extract-install-filenames98
-rwxr-xr-xdebian/bin/gen-install-files.sh (renamed from debian/gen-install-files.sh)2
-rwxr-xr-xdebian/bin/install-build-deps.sh (renamed from debian/install-build-deps.sh)0
-rw-r--r--debian/custom/grc.conf (renamed from debian/grc.conf)0
-rw-r--r--debian/custom/libusrp.udev (renamed from debian/libusrp.udev)0
-rw-r--r--debian/custom/libusrp2.limits (renamed from debian/libusrp2.limits)0
-rw-r--r--debian/custom/usrp.hotplug (renamed from debian/usrp.hotplug)0
-rwxr-xr-xdebian/rules12
8 files changed, 105 insertions, 7 deletions
diff --git a/debian/bin/extract-install-filenames b/debian/bin/extract-install-filenames
new file mode 100755
index 000000000..8ffce9db1
--- /dev/null
+++ b/debian/bin/extract-install-filenames
@@ -0,0 +1,98 @@
+#!/usr/bin/env python
+
+"""
+Example usage:
+
+ $ extract_install_filenames gnuradio-core/src/lib/swig/Makefile grgrpython_PYTHON
+
+Produces:
+
+ usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_python.py
+ usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py
+ usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_general.py
+ usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_gengen.py
+ usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_filter.py
+ usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_io.py
+
+"""
+
+from optparse import OptionParser
+import re
+import sys
+import tempfile
+import os
+
+def make_makefile_tail(dirname, full_var_name):
+
+ s = '''
+extract_install_filenames:
+ @echo $(%s)
+ @echo $(%s)
+
+''' % (dirname, full_var_name)
+ return s
+
+
+def main():
+ parser = OptionParser(usage="usage: %prog [options] Makefile AM-variable-name")
+ (options, args) = parser.parse_args()
+ if len(args) != 2:
+ parser.print_help()
+ raise SystemExit
+
+ makefile_name = args[0]
+ makefile = open(makefile_name, 'r')
+ full_var_name = args[1]
+
+ L = re.split('_', full_var_name)
+ prefix = '_'.join(L[:-1])
+ suffix = L[-1]
+
+ #print "prefix= ", prefix
+ #print "suffix= ", suffix
+
+ if suffix.upper() != suffix:
+ raise SystemExit, "AM-variable-name is malformed. Expected something like grgrpython_PYTHON"
+
+ if prefix[:5] == "dist_":
+ dirname = prefix[5:] + "dir"
+ else:
+ dirname = prefix + "dir"
+ #print "dirname =", dirname
+
+ tail = make_makefile_tail(dirname, full_var_name)
+
+ tmp_makefile = tempfile.NamedTemporaryFile()
+ #print "tmp_makefile =", tmp_makefile
+ tmp_name = tmp_makefile.name
+ #print "tmp_name =", tmp_name
+ s = makefile.read()
+ tmp_makefile.write(s)
+ tmp_makefile.write(tail)
+ tmp_makefile.flush()
+
+ (head, tail) = os.path.split(makefile_name)
+ if head:
+ # cd to directory that contained the original Makefile
+ cmd = 'cd %s; make -s -f %s extract_install_filenames' % (head, tmp_name)
+ else:
+ cmd = 'make -s -f %s extract_install_filenames' % (tmp_name,)
+
+ #print "cmd =", cmd
+ make = os.popen(cmd, 'r')
+ target_dirname = make.readline().rstrip()
+ target_files = make.readline().rstrip()
+ if target_dirname.startswith('/'):
+ target_dirname = target_dirname[1:]
+
+ #print "target_dirname =", target_dirname
+ #print "target_files =", target_files
+
+ for f in target_files.split():
+ sys.stdout.write(os.path.join(target_dirname, f.split('/')[-1]) + '\n')
+
+if __name__ == '__main__':
+ main()
+
+
+
diff --git a/debian/gen-install-files.sh b/debian/bin/gen-install-files.sh
index ba690d02e..ab04787c9 100755
--- a/debian/gen-install-files.sh
+++ b/debian/bin/gen-install-files.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-EXTRACT=dtools/bin/extract_install_filenames
+EXTRACT=debian/bin/extract-install-filenames
# libusrp-dev
NAME=debian/libusrp-dev.install
diff --git a/debian/install-build-deps.sh b/debian/bin/install-build-deps.sh
index 256717eb3..256717eb3 100755
--- a/debian/install-build-deps.sh
+++ b/debian/bin/install-build-deps.sh
diff --git a/debian/grc.conf b/debian/custom/grc.conf
index eb503ec95..eb503ec95 100644
--- a/debian/grc.conf
+++ b/debian/custom/grc.conf
diff --git a/debian/libusrp.udev b/debian/custom/libusrp.udev
index e45dc294a..e45dc294a 100644
--- a/debian/libusrp.udev
+++ b/debian/custom/libusrp.udev
diff --git a/debian/libusrp2.limits b/debian/custom/libusrp2.limits
index f259b2992..f259b2992 100644
--- a/debian/libusrp2.limits
+++ b/debian/custom/libusrp2.limits
diff --git a/debian/usrp.hotplug b/debian/custom/usrp.hotplug
index e8b943204..e8b943204 100644
--- a/debian/usrp.hotplug
+++ b/debian/custom/usrp.hotplug
diff --git a/debian/rules b/debian/rules
index 4f77b4a09..cc298e4c6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,7 +46,7 @@ configure-stamp:
--disable-gr-audio-osx \
--disable-gr-audio-windows \
--disable-gcell --disable-gr-gcell \
- --disable-gr-comedi --disable-usrp2-firmware
+ --disable-gr-comedi
touch configure-stamp
build: build-stamp
@@ -57,9 +57,9 @@ build-stamp: configure-stamp
touch $@
extract: extract-stamp
-extract-stamp: build-stamp debian/gen-install-files.sh
+extract-stamp: build-stamp debian/bin/gen-install-files.sh
dh_testdir
- debian/gen-install-files.sh
+ debian/bin/gen-install-files.sh
touch $@
install: install-stamp
@@ -79,15 +79,15 @@ install-stamp: extract-stamp debian/control
done
: # Deposit rule to allow group 'usrp' access to USRP hardware
- install -m 0644 -D debian/libusrp.udev \
+ install -m 0644 -D debian/custom/libusrp.udev \
debian/tmp/etc/udev/rules.d/40-usrp.rules
: # Deposit rule to allow group 'usrp' access to USRP2 hardware
- install -m 0644 -D debian/libusrp2.limits \
+ install -m 0644 -D debian/custom/libusrp2.limits \
debian/tmp/etc/security/limits.d/libusrp2.limits
: # Install custom grc.conf
- install -m 0644 -D debian/grc.conf \
+ install -m 0644 -D debian/custom/grc.conf \
debian/tmp/etc/gnuradio/conf.d/grc.conf
dh_install --sourcedir=debian/tmp