summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules15
-rwxr-xr-xscripts/deb12
-rwxr-xr-xscripts/make-tarball19
-rw-r--r--scripts/origsrc-file-list44
6 files changed, 83 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 1677b58..4733c41 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
build*
*~
+/tmp.*
diff --git a/debian/control b/debian/control
index 450a7d0..d9cbed0 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Homepage: https://code.google.com/p/antpm/
Vcs-Git: https://code.google.com/p/antpm/
Vcs-Browser: https://code.google.com/p/antpm/source/browse/
-Package: antp
+Package: antpm
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: ANT+minus implements the ANT/ANT+/ANT-FS protocols and provides tools.
diff --git a/debian/rules b/debian/rules
index ae6583c..e71cde5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,5 @@
#!/usr/bin/make -f
+# -*- makefile -*-
# ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
# CFLAGS += -O2
@@ -6,6 +7,20 @@
export DH_VERBOSE=1
+NUMCPUS=$(shell grep -c '^processor' /proc/cpuinfo)
+
%:
dh $@
+override_dh_auto_configure:
+ # echo -e "\n\n\nCMAKE\n\n\n"
+ # echo $(NUMCPUS)
+ mkdir cmake-build
+ cd cmake-build && cmake ../src -DCMAKE_INSTALL_PREFIX=/usr
+
+override_dh_auto_build:
+ cd cmake-build && $(MAKE) -j$(NUMCPUS)
+
+DESTDIR=../debian/antpm/
+override_dh_install:
+ cd cmake-build && $(MAKE) install DESTDIR=$(DESTDIR)
diff --git a/scripts/deb b/scripts/deb
index 9e270c2..61992f4 100755
--- a/scripts/deb
+++ b/scripts/deb
@@ -6,21 +6,15 @@ eval ROOT=$ROOT
echo $ROOT
echo
-BUILD=./build
-
-(
- cd $BUILD
- make dist
-)
-
+./scripts/make-tarball
echo -e "\nTarball OK\n"
-mv $BUILD/antpm*.orig.tar.gz $ROOT/
+mv antpm_*.orig.tar.xz $ROOT/
( cd $ROOT;
mkdir build;
cd build
- tar -z -xf ../antpm*.tar.gz
+ tar --xz -xf ../antpm*.tar.xz
echo -e "\nStarting to build...\n"
debuild -us -uc && echo -e "\nBuild OK\ndeb package in '${ROOT}' \n";
)
diff --git a/scripts/make-tarball b/scripts/make-tarball
new file mode 100755
index 0000000..b95bcaa
--- /dev/null
+++ b/scripts/make-tarball
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+VER=1.0
+GIT_VER=`git log | head -1 | awk '{print $2 }'`
+OUTNAME=antpm_${VER}.orig.tar
+
+FILES=`find . -type f -name \* -print | grep -v .git`
+TMP_LIST=`mktemp`
+
+#echo $FILES
+#echo "TMP_LIST=${TMP_LIST}"
+#echo ${FILES} > ${TMP_LIST}
+#echo ${FILES} > dist-file-list
+
+#find . -type f -name \* -print | grep -v .git > scripts/dist-file-list
+
+rm -fv ${OUTNAME}.gz ${OUTNAME}.xz
+#tar -czvf ${OUTNAME}.gz -T scripts/origsrc-file-list
+tar --xz -cf ${OUTNAME}.xz -T scripts/origsrc-file-list
diff --git a/scripts/origsrc-file-list b/scripts/origsrc-file-list
new file mode 100644
index 0000000..4f02de7
--- /dev/null
+++ b/scripts/origsrc-file-list
@@ -0,0 +1,44 @@
+debian
+debian/rules
+debian/source
+debian/source/format
+debian/copyright
+debian/control
+debian/gpl-2.0.txt
+debian/compat
+debian/changelog
+src
+src/CMakeLists.txt
+src/lqueue.hpp
+src/AntMessage.hpp
+src/SerialTty.hpp
+src/AntChannel.hpp
+src/GarminConvert.hpp
+src/w_stdint.h
+src/antpm-downloader.cpp
+src/SerialTty.cpp
+src/AntChannel.cpp
+src/AntMessenger.hpp
+src/AntFr310XT.hpp
+src/common.cpp
+src/antpm-fit2gpx.cpp
+src/antdefs.hpp
+src/SerialUsb.hpp
+src/SerialUsb.cpp
+src/antpm-usbmon2ant.cpp
+src/GarminConvert.cpp
+src/GPX.cpp
+src/stdintfwd.hpp
+src/w_inttypes.h
+src/FIT.hpp
+src/AntFr310XT.cpp
+src/AntMessage.cpp
+src/FIT.cpp
+src/GPX.hpp
+src/SmartPtrFwd.hpp
+src/cmake
+src/cmake/Findlibusb-1.0.cmake
+src/cmake/FindLIBUSB.cmake
+src/Serial.hpp
+src/common.hpp
+src/AntMessenger.cpp