Merge branch 'master' into development
diff --git a/apps/grgsm_decode b/apps/grgsm_decode
index b3d64d0..4be199d 100755
--- a/apps/grgsm_decode
+++ b/apps/grgsm_decode
@@ -287,7 +287,7 @@
                                   + ", ".join(grgsm.arfcn.get_bands()) + "."
                                   + "If no band is specified, it will be determined automatically, defaulting to 0.")
     cfile_options.add_option("-s", "--samp-rate", dest="samp_rate", type="eng_float",
-                             default=eng_notation.num_to_str(2e6),
+                             default=eng_notation.num_to_str(1e6),
                              help="Sample rate of cfile capture [default=%default]")
     parser.add_option_group(cfile_options)
 
diff --git a/apps/helpers/grgsm_capture.py b/apps/helpers/grgsm_capture.py
index f5d2651..51c13ac 100755
--- a/apps/helpers/grgsm_capture.py
+++ b/apps/helpers/grgsm_capture.py
@@ -193,7 +193,7 @@
                       help="Set gain [default=%default]")
     
     parser.add_option("-s", "--samp-rate", dest="samp_rate", type="eng_float", 
-                      default=eng_notation.num_to_str(2000000.052982),
+                      default=eng_notation.num_to_str(2000000),
                       help="Set samp_rate [default=%default]")
     
     parser.add_option("-p", "--ppm", dest="ppm", type="intx", default=0,
diff --git a/apps/helpers/grgsm_channelize.py b/apps/helpers/grgsm_channelize.py
index f7f0100..146bb8f 100755
--- a/apps/helpers/grgsm_channelize.py
+++ b/apps/helpers/grgsm_channelize.py
@@ -43,10 +43,10 @@
 
 EXTRA_HELP = """
 Example usage:
-grgsm_channelize.py -f my_wideband_capture.cfile -c 925.2e6 990 991 992 993 994 995 1019 1020 1021 1022 1023
+grgsm_channelize.py -c my_wideband_capture.cfile -f 925.2e6 990 991 992 993 994 995 1019 1020 1021 1022 1023
 
 The above example will channelize my_wideband_capture.cfile, in this case a cfile captured at
-925.2 MHz centered (ARFCN 975) and 20 Msps. As a result, 12 files will be generated for
+925.2 MHz centered (ARFCN 975) and 2 Msps. As a result, 12 files will be generated for
 ARFCNs 975 - 1023 at 1 Msps each.
 """
 
@@ -117,7 +117,7 @@
     parser = ArgumentParser(formatter_class=RawDescriptionHelpFormatter, description='Split wideband a GSM capture into seperate files per ARFCN.', add_help=True, epilog=EXTRA_HELP)
     parser.add_argument(dest="channel", type=int, nargs='+',
         help="List of ARFCNs")
-    parser.add_argument("-s", "--samp-rate", dest="samp_rate", type=eng_float, default=eng_notation.num_to_str(2e7),
+    parser.add_argument("-s", "--samp-rate", dest="samp_rate", type=eng_float, default=eng_notation.num_to_str(2e6),
         help="Sample rate of the wideband capture file [default=%(default)s]")
     parser.add_argument("-f", "--fc", dest="fc", type=eng_float, default=eng_notation.num_to_str(935e6), required=True,
         help="Carrier frequency in Hz [default=%(default)s]")
diff --git a/debian/build-package b/debian/build-package
new file mode 100755
index 0000000..d0d822a
--- /dev/null
+++ b/debian/build-package
@@ -0,0 +1,8 @@
+#!/bin/bash
+cd ../..
+
+tar -acf gr-gsm_0.3.orig.tar.gz gr-gsm
+cd gr-gsm
+debuild -S -sa
+cd ..
+dput ppa:ptrkrysik/gr-gsm gr-gsm_0.3-0ppa0_source.changes
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..2f7a22b
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+gr-gsm (0.3-0ppa0) xenial; urgency=low
+
+  * Initial upload!
+
+ -- Piotr Krysik <ptrkrysik@gmail.com>  Sun, 24 Apr 2016 16:00:00 +0100
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d4e5661
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,13 @@
+Source: gr-gsm
+Section: devel
+Priority: optional
+Maintainer: Your Name <your.email@some.where>
+Build-Depends: cmake, build-essential, python-scipy, gnuradio-dev, gr-osmosdr, libosmocore-dev
+
+Homepage: http://www.yourhomepage.org
+Package: gr-gsm
+Architecture: any
+Depends:  ${shlibs:Depends}, ${misc:Depends}, gnuradio, gr-osmosdr, python-scipy
+Description: First test-package
+ Long description of greet-the-world.
+ It can span multiple lines!
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..51af985
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,18 @@
+####################################################################
+#                    gr-gsm                                        #
+####################################################################
+
+Copyright (C) 2011 Your Name
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or 
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of 
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..6b44c5b
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+
+BUILDDIR = build
+
+# secondly called by launchpad
+build:
+	mkdir $(BUILDDIR);
+	cd $(BUILDDIR); cmake -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr ..
+	make -C $(BUILDDIR)
+
+# thirdly called by launchpad
+binary: binary-indep binary-arch
+
+binary-indep:
+	# nothing to be done
+
+binary-arch:
+	cd $(BUILDDIR); cmake -P cmake_install.cmake
+	mkdir debian/tmp/DEBIAN
+	dpkg-gencontrol -pgr-gsm
+	dpkg --build debian/tmp ..
+
+# firstly called by launchpad
+clean:
+	rm -rf $(BUILDDIR)
+
+.PHONY: binary binary-arch binary-indep clean