Browse Source

Add bintray config

Christian W. Zuckschwerdt 11 months ago
parent
commit
fc8734e382
4 changed files with 143 additions and 0 deletions
  1. 31 0
      .bintray.json
  2. 15 0
      .travis.yml
  3. 5 0
      CMakeLists.txt
  4. 92 0
      do_sysroot.sh

+ 31 - 0
.bintray.json

@@ -0,0 +1,31 @@
+{
+    "package": {
+        "name": "rtl_433",
+        "repo": "dist",
+        "subject": "chzu",
+        "desc": "Official binary builds of rtl_433",
+        "website_url": "https://github.com/merbanan/rtl_433",
+        "issue_tracker_url": "https://github.com/merbanan/rtl_433/issues",
+        "vcs_url": "https://github.com/merbanan/rtl_433.git",
+        "github_use_tag_release_notes": true,
+        "github_release_notes_file": "RELEASE.txt",
+        "licenses": ["GPL"],
+        "labels": ["rtl-sdr", "sdr", "SoapySDR"],
+        "public_download_numbers": true,
+        "public_stats": true
+    },
+
+    "version": {
+        "name": "${GIT_VERSION}",
+        "desc": "rtl_433 at ${GIT_VERSION}",
+        "released": "${GIT_TIMESTAMP_ISO}",
+        "gpgSign": false
+    },
+
+    "files":
+        [
+        {"includePattern": "rtl_433-win-x32.zip", "uploadPattern": "/rtl_433-${GIT_VERSION}-win-x32.zip"},
+        {"includePattern": "rtl_433-win-x64.zip", "uploadPattern": "/rtl_433-${GIT_VERSION}-win-x64.zip"}
+        ],
+    "publish": true
+}

File diff suppressed because it is too large
+ 15 - 0
.travis.yml


+ 5 - 0
CMakeLists.txt

@@ -177,6 +177,11 @@ endif()
 ########################################################################
 include(CTest) # note: this adds a BUILD_TESTING which defaults to ON
 
+########################################################################
+# Configure CI deploy
+########################################################################
+configure_file(${CMAKE_SOURCE_DIR}/.bintray.json ${CMAKE_CURRENT_BINARY_DIR}/bintray.json)
+
 ########################################################################
 # Add subdirectories
 ########################################################################

+ 92 - 0
do_sysroot.sh

@@ -0,0 +1,92 @@
+#!/bin/bash
+
+set -e
+
+libusb_ver=1.0.22
+rtlsdr_ver=0.6.0
+
+# from https://libusb.info/
+[ -e libusb-${libusb_ver}.7z ] || curl -L -O https://github.com/libusb/libusb/releases/download/v${libusb_ver}/libusb-${libusb_ver}.7z
+mkdir libusb
+7zr x -olibusb -y libusb-${libusb_ver}.7z
+
+sysroot32=$(pwd)/sysroot32
+sysroot64=$(pwd)/sysroot64
+sysroot32static=$(pwd)/sysroot32static
+sysroot64static=$(pwd)/sysroot64static
+
+mkdir -p sysroot{32,64}{,static}/usr/{include,lib,bin}
+
+cp libusb/include/libusb-1.0/libusb.h $sysroot32/usr/include
+cp libusb/include/libusb-1.0/libusb.h $sysroot64/usr/include
+cp libusb/include/libusb-1.0/libusb.h $sysroot32static/usr/include
+cp libusb/include/libusb-1.0/libusb.h $sysroot64static/usr/include
+
+cp libusb/MinGW32/static/libusb-1.0.a $sysroot32static/usr/lib
+cp libusb/MinGW64/static/libusb-1.0.a $sysroot64static/usr/lib
+
+cp libusb/MinGW32/dll/libusb-1.0.dll $sysroot32/usr/bin
+cp libusb/MinGW32/dll/libusb-1.0.dll.a $sysroot32/usr/lib
+cp libusb/MinGW64/dll/libusb-1.0.dll $sysroot64/usr/bin
+cp libusb/MinGW64/dll/libusb-1.0.dll.a $sysroot64/usr/lib
+
+# or git clone https://github.com/osmocom/rtl-sdr.git
+[ -e rtl-sdr-${rtlsdr_ver}.tar.gz ] || curl -L -o rtl-sdr-${rtlsdr_ver}.tar.gz https://github.com/osmocom/rtl-sdr/archive/${rtlsdr_ver}.tar.gz
+tar xzf rtl-sdr-${rtlsdr_ver}.tar.gz
+cd rtl-sdr-${rtlsdr_ver}
+
+[ "$(uname)" = "Darwin" ] && export tools=/opt/local
+
+export CMAKE_SYSROOT=$sysroot32 ; echo $CMAKE_SYSROOT
+mkdir build-tmp ; cd build-tmp ; cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/Toolchain-gcc-mingw-w64-i686.cmake .. && make && make install ; cd ..
+rm -rf build-tmp
+mv $sysroot32/usr/lib/librtlsdr_static.a $sysroot32/usr/lib/librtlsdr.a
+
+export CMAKE_SYSROOT=$sysroot32static ; echo $CMAKE_SYSROOT
+mkdir build-tmp ; cd build-tmp ; cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/Toolchain-gcc-mingw-w64-i686.cmake -DBUILD_SHARED_LIBS:BOOL=OFF .. && make && make install ; cd ..
+rm -rf build-tmp
+mv $sysroot32static/usr/lib/librtlsdr_static.a $sysroot32static/usr/lib/librtlsdr.a
+rm $sysroot32static/usr/lib/librtlsdr.dll.a
+rm $sysroot32static/usr/bin/librtlsdr.dll
+
+export CMAKE_SYSROOT=$sysroot64 ; echo $CMAKE_SYSROOT
+mkdir build-tmp ; cd build-tmp ; cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/Toolchain-gcc-mingw-w64-x86-64.cmake .. && make && make install ; cd ..
+rm -rf build-tmp
+mv $sysroot64/usr/lib/librtlsdr_static.a $sysroot64/usr/lib/librtlsdr.a
+
+export CMAKE_SYSROOT=$sysroot64static ; echo $CMAKE_SYSROOT
+mkdir build-tmp ; cd build-tmp ; cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/Toolchain-gcc-mingw-w64-x86-64.cmake -DBUILD_SHARED_LIBS:BOOL=OFF .. && make && make install ; cd ..
+rm -rf build-tmp
+mv $sysroot64static/usr/lib/librtlsdr_static.a $sysroot64static/usr/lib/librtlsdr.a
+rm $sysroot64static/usr/lib/librtlsdr.dll.a
+rm $sysroot64static/usr/bin/librtlsdr.dll
+
+cd ..
+
+# build rtl_433
+
+export CMAKE_SYSROOT=$sysroot32 ; echo $CMAKE_SYSROOT
+mkdir build-tmp ; cd build-tmp ; cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-gcc-mingw-w64-i686.cmake .. && make && make install ; cd ..
+rm -rf build-tmp
+
+export CMAKE_SYSROOT=$sysroot32static ; echo $CMAKE_SYSROOT
+mkdir build-tmp ; cd build-tmp ; cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-gcc-mingw-w64-i686.cmake .. && make && make install ; cd ..
+rm -rf build-tmp
+mv $sysroot32static/usr/bin/rtl_433.exe $sysroot32static/usr/bin/rtl_433_32bit_static.exe
+
+export CMAKE_SYSROOT=$sysroot64 ; echo $CMAKE_SYSROOT
+mkdir build-tmp ; cd build-tmp ; cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-gcc-mingw-w64-x86-64.cmake .. && make && make install ; cd ..
+rm -rf build-tmp
+
+export CMAKE_SYSROOT=$sysroot64static ; echo $CMAKE_SYSROOT
+mkdir build-tmp ; cd build-tmp ; cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-gcc-mingw-w64-x86-64.cmake .. && make && make install ; cd ..
+rm -rf build-tmp
+mv $sysroot64static/usr/bin/rtl_433.exe $sysroot64static/usr/bin/rtl_433_64bit_static.exe
+
+# collect package
+
+echo Packing rtl_433-win-x32.zip
+zip --junk-paths rtl_433-win-x32.zip sysroot32*/usr/bin/*.dll sysroot32*/usr/bin/rtl_433*.exe
+
+echo Packing rtl_433-win-x64.zip
+zip --junk-paths rtl_433-win-x64.zip sysroot64*/usr/bin/*.dll sysroot64*/usr/bin/rtl_433*.exe