Permalink
Browse files

cmake: Remove all cpack options including IPK generation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
  • Loading branch information...
arfoll committed Feb 20, 2018
1 parent 2deaa73 commit ae2371c80448d24d6716033d3dfbfd7788b04fa5
Showing with 0 additions and 343 deletions.
  1. +0 −62 CMakeLists.txt
  2. +0 −22 README.md
  3. +0 −222 cmake/modules/CPackDeb.cmake
  4. +0 −16 docker-compose.yaml
  5. +0 −17 docs/building.md
  6. +0 −2 scripts/build-android.sh
  7. +0 −2 scripts/run-cmake.sh
@@ -134,8 +134,6 @@ option (ONEWIRE "Add Onewire support to mraa." ON)
option (JSONPLAT "Add Platform loading via a json file." ON)
option (IMRAA "Add Imraa support to mraa." OFF)
option (FTDI4222 "Build with FTDI FT4222 subplatform support." OFF)
option (IPK "Generate IPK using CPack" OFF)
option (RPM "Generate RPM using CPack" OFF)
option (ENABLEEXAMPLES "Disable building of examples" ON)
option (INSTALLTOOLS "Install all tools" ON)
option (BUILDTESTS "Override the addition of tests" ON)
@@ -197,66 +195,6 @@ if (BUILDDOC)
endif (DOXYGEN_FOUND AND DOXYGEN_VERSION VERSION_GREATER "1.8")
endif ()
if (IPK)
# Get target package arch from Yocto ADT sysroot if set or host OS, mapping to Ubuntu name if necessary
if (DEFINED ENV{OECORE_TARGET_SYSROOT})
GET_FILENAME_COMPONENT (DETECTED_SYSROOT $ENV{OECORE_TARGET_SYSROOT} NAME)
string (REGEX REPLACE "-poky-linux" "" TARGET_ARCH "${DETECTED_SYSROOT}")
else ()
# debian uses amd64 to denote x86_64
if (DETECTED_ARCH STREQUAL "x86_64")
set (TARGET_ARCH "amd64")
else ()
set (TARGET_ARCH ${DETECTED_ARCH})
endif ()
endif ()
message (STATUS "INFO - Package arch is ${TARGET_ARCH}")
set(CPACK_GENERATOR "DEB")
set(OPKG_ARCH ${TARGET_ARCH})
set(CPACK_BINARY_DIR ${CMAKE_BINARY_DIR})
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Intel IoT-Devkit") #required
set(mraa_PACKAGE_ON_TAG ".")
if ("${VERSION_COMMIT}" STREQUAL "")
set(mraa_PACKAGE_ON_TAG "")
endif()
set(CPACK_PACKAGE_VERSION
"${mraa_VERSION_MAJOR}.${mraa_VERSION_MINOR}.${mraa_VERSION_PATCH}${mraa_PACKAGE_ON_TAG}${VERSION_COMMIT}")
set(CPACK_PACKAGE_NAME "mraa")
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${TARGET_ARCH})
set(CPACK_SYSTEM_NAME ${TARGET_ARCH})
set(CPACK_DEBIAN_PACKAGE_PROVIDES "mraa-dev, mraa-dbg, mraa-doc")
set(CPACK_DEBIAN_PACKAGE_REPLACES "${CPACK_DEBIAN_PACKAGE_PROVIDES}, libmraa, libmraa-dev, libmraa-doc")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS ${CPACK_DEBIAN_PACKAGE_PROVIDES})
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
include (CPack)
endif()
if (RPM)
message (STATUS "INFO - Enabled RPM packaging for ${DETECTED_ARCH}")
set(CMAKE_INSTALL_PREFIX "/usr")
set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_GENERATOR "RPM")
set(CPACK_PACKAGE_NAME "libmraa${mraa_VERSION_MAJOR}")
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_PACKAGE_VERSION
"${mraa_VERSION_MAJOR}.${mraa_VERSION_MINOR}.${mraa_VERSION_PATCH}${mraa_PACKAGE_ON_TAG}${VERSION_COMMIT}")
set(CPACK_PACKAGE_CONTACT "Intel IoT-Devkit")
set(CPACK_PACKAGE_VENDOR "Intel IoT-Devkit")
set(CPACK_RPM_PACKAGE_PROVIDES "${CPACK_PACKAGE_NAME}-devel")
# Get distro tag (e.g. 'fc20') by parsing output of rpm --showrc
EXECUTE_PROCESS(
COMMAND rpm --showrc
COMMAND grep -w dist
COMMAND sed -e "s/\\t./ /"
COMMAND awk "{printf \"%s\", \$NF}"
OUTPUT_VARIABLE DIST_TAG
)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${DIST_TAG}.${DETECTED_ARCH}")
include(CPack)
endif()
add_subdirectory (src)
if (ENABLEEXAMPLES)
add_subdirectory (examples)
@@ -123,28 +123,6 @@ in /usr/lib.
Subplatforms (i.e. Firmata) have to be added manually with this kind of install
from your application, as shown in [this example](examples/javascript/firmata.js).
Installing on Intel 32bit Yocto based opkg image
------------------------------------------------
See the section below on compiling or use our repository to install on a glibc
based yocto poky image that supports opkg. Adding this repository is as simple
as and you'll have the latest stable tagged build of mraa installed!
``` bash
echo "src mraa-upm http://iotdk.intel.com/repos/3.5/intelgalactic/opkg/i586" > /etc/opkg/mraa-upm.conf
opkg update
opkg install mraa
```
If you would like to get the latest & greatest builds from master HEAD you can
use our -dev repository
```bash
echo "src mraa-upm http://iotdk.intel.com/repos/3.5/intelgalactic-dev/opkg/i586" > /etc/opkg/mraa-upm.conf
opkg update
opkg install mraa
```
Compiling
=========

This file was deleted.

Oops, something went wrong.
@@ -21,8 +21,6 @@ services:
- JSONPLAT=${JSONPLAT:-OFF}
- IMRAA=${IMRAA:-OFF}
- FTDI4222=${FTDI4222:-OFF}
- IPK=${IPK:-OFF}
- RPM=${RPM:-OFF}
- ENABLEEXAMPLES=${ENABLEEXAMPLES:-OFF}
- INSTALLTOOLS=${INSTALLTOOLS:-ON}
- CC=${CC:-clang-3.8}
@@ -105,20 +103,6 @@ services:
- FTDI4222=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild"
ipk:
extends: all
environment:
- IPK=ON
- ENABLEEXAMPLES=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild package"
rpm:
extends: all
environment:
- RPM=ON
- ENABLEEXAMPLES=ON
command: bash -c "./scripts/run-cmake.sh && make -Cbuild package"
python2:
extends: base
image: inteliotdevkit/mraa-python
@@ -164,23 +164,6 @@ java -cp $DIR_WHERE_YOU_INSTALLED_MRAA/mraa.jar:. Example
If you want to add or improve Java bindings for mraa, please follow the <a href="https://github.com/intel-iot-devkit/upm/blob/master/docs/creating_java_bindings.md">Creating Java Bindings Guide</a>.
## Building an IPK/RPM package using `cpack`
You can get `cpack` to generate an IPK or RPM package fairly easily if you have
the correct packaging tools
~~~~~~~~~~~~~{.sh}
cmake -DIPK=ON -DCMAKE_INSTALL_PREFIX=/usr ..
make package
~~~~~~~~~~~~~
To use RPM simply enable the RPM option. You'll need `rpmbuild` installed on your
build machine.
~~~~~~~~~~~~~{.sh}
cmake -DRPM=ON -DCMAKE_INSTALL_PREFIX=/usr ..
~~~~~~~~~~~~~
## Building for the Android Things Peripheralmanager Client
Requirements:
@@ -72,8 +72,6 @@ cmake \
-DJSONPLAT=$JSONPLAT \
-DIMRAA=$IMRAA \
-DFTDI4222=$FTDI4222 \
-DIPK=$IPK \
-DRPM=$RPM \
-DENABLEEXAMPLES=$ENABLEEXAMPLES \
-DINSTALLTOOLS=$INSTALLTOOLS \
-DBUILDTESTS=$BUILDTESTS \
@@ -17,8 +17,6 @@ cmake \
-DJSONPLAT=$JSONPLAT \
-DIMRAA=$IMRAA \
-DFTDI4222=$FTDI4222 \
-DIPK=$IPK \
-DRPM=$RPM \
-DENABLEEXAMPLES=$ENABLEEXAMPLES \
-DINSTALLTOOLS=$INSTALLTOOLS \
-DBUILDTESTS=$BUILDTESTS \

0 comments on commit ae2371c

Please sign in to comment.