Update package creation (#186)

* Update packages.cmake

* Update packages.cmake

* Update postinst

* Update packages.cmake

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* update cc
This commit is contained in:
brindosch 2016-08-20 16:37:45 +02:00 committed by GitHub
parent 63a410cb04
commit ceeed07e6c
11 changed files with 37 additions and 51 deletions

View File

@ -1,10 +1,10 @@
#!/bin/bash
#Updated: 13 March 2016, by TPmodding
#Updated: 18 August 2016, by brindosch
#Just use a clean Ubunut 14.04 and run this script
##############
#ON TARGET
#--------------
#sudo apt-get install libQt4-dev libusb-1.0-0-dev python-dev rsync
#sudo apt-get install qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev python-dev rsync
#############
#ON HOST
@ -12,7 +12,8 @@
sudo apt-get update
sudo apt-get upgrade
#TO-DO verify what is really required
sudo apt-get install git rsync cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev libxrender-dev protobuf-compiler lib32z1 lib32ncurses5 lib32bz2-1.0 zlib1g-dev
#blacklist: protobuf-compiler lib32z1 lib32ncurses5 lib32bz2-1.0 zlib1g-dev
sudo apt-get -qq -y install git rsync cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev
echo 'PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin' >> .bashrc
#---------
@ -36,10 +37,10 @@ rsync -rl --delete-after --copy-unsafe-links $TARGET_USER@$TARGET_IP:/{lib,usr}
######## RPi specific #########
mkdir -p "$RASCROSS_DIR/firmware"
git clone https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
git clone --depth 1 https://github.com/raspberrypi/firmware.git "$RASCROSS_DIR/firmware"
ln -s "$RASCROSS_DIR/firmware/hardfp/opt" "$ROOTFS_DIR/opt"
git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"
git clone --depth 1 git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"
##### End of RPi specific ######
@ -55,7 +56,7 @@ git clone git://github.com/raspberrypi/tools.git "$RASCROSS_DIR/tools"
######## NOT TESTED #########
# get the Hyperion sources
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
git clone --recursive https://github.com/hyperion-project/hyperion.ng.git "$HYPERION_DIR"
# do a native build (to build the protobuf compiler for the native platform)
mkdir -p "$NATIVE_BUILD_DIR"
@ -67,9 +68,6 @@ mkdir -p "$TARGET_BUILD_DIR"
cmake -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" -DIMPORT_PROTOC=$NATIVE_BUILD_DIR/protoc_export.cmake --build "$TARGET_BUILD_DIR" "$HYPERION_DIR"
#compile
cd "$HYPERION_DIR/deploy"
rm -rf hummingboard_prerelease.tar.gz hyperion.deps.openelec-imx6.tar.gz hyperion.deps.openelec-rpi.tar.gz hyperion_imx6.tar.gz hyperion_rpi.tar.gz hyperion_wetek.tar.gz hyperion_x32.tar.gz hyperion_x64.tar.gz
cd
cd "$HYPERION_DIR/bin"
chmod +x *
cp "$HYPERION_DIR/bin/create_all_releases.sh" "$HYPERION_DIR"

View File

@ -17,7 +17,7 @@ install_file()
}
echo "--- hyperion ambilight postinstall ---"
echo "--- hyperion ambient light postinstall ---"
echo "- install configuration template"
mkdir -p /etc/hyperion
install_file /usr/share/hyperion/config/hyperion.config.json.default /etc/hyperion/hyperion.config.json
@ -30,17 +30,7 @@ start_msg=""
restart_msg=""
SERVICE_POSTFIX=""
if [ -e /sbin/initctl ]
then
echo "- init deamon: upstart"
# upstart
$HYPERION_RUNNING && initctl stop hyperion
install_file /usr/share/hyperion/service/hyperion.initctl.sh /etc/init/hyperion.conf || SERVICE_POSTFIX=".new"
initctl reload-configuration
start_msg="initctl start hyperion"
$HYPERION_RUNNING && initctl start hyperion
elif grep -m1 systemd /proc/1/comm > /dev/null
if grep -m1 systemd /proc/1/comm > /dev/null
then
echo "- init deamon: systemd"
# systemd
@ -50,16 +40,15 @@ then
start_msg="systemctl start hyperion"
$HYPERION_RUNNING && systemctl start hyperion
# if [ $OS_OSMC -eq 1 ]; then
# echo '---> Modify systemd script for OSMC usage'
# # Wait until kodi is sarted (for kodi checker)
# sed -i '/After = mediacenter.service/d' /etc/systemd/system/hyperion.service
# sed -i '/Unit/a After = mediacenter.service' /etc/systemd/system/hyperion.service
# sed -i 's/User=osmc/User=root/g' /etc/systemd/system/hyperion.service
# sed -i 's/Group=osmc/Group=root/g' /etc/systemd/system/hyperion.service
# systemctl -q daemon-reload
# fi
# systemctl start hyperion
elif [ -e /sbin/initctl ]
then
echo "- init deamon: upstart"
# upstart
$HYPERION_RUNNING && initctl stop hyperion
install_file /usr/share/hyperion/service/hyperion.initctl.sh /etc/init/hyperion.conf || SERVICE_POSTFIX=".new"
initctl reload-configuration
start_msg="initctl start hyperion"
$HYPERION_RUNNING && initctl start hyperion
else
echo "- init deamon: sysV"

View File

@ -3,18 +3,18 @@
SET ( CPACK_GENERATOR "DEB" "TGZ" "STGZ" ) # "RPM"
SET ( CPACK_PACKAGE_NAME "hyperion" )
SET ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hyperion is an opensource 'AmbiLight' implementation" )
SET ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hyperion is an open source ambient light implementation" )
SET ( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md" )
SET ( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" )
SET ( CPACK_DEBIAN_PACKAGE_MAINTAINER "hyperion team")
SET ( CPACK_DEBIAN_PACKAGE_NAME "hyperion" )
SET ( CPACK_DEBIAN_PACKAGE_MAINTAINER "Hyperion Team")
SET ( CPACK_DEBIAN_PACKAGE_NAME "Hyperion" )
SET ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/postinst" )
SET ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/hyperion-project/hyperion" )
SET ( CPACK_DEBIAN_PACKAGE_DEPENDS "libqtcore4 (>= 4:4.8.0), libqt4-network (>= 4:4.8.0), libusb-1.0-0, libpython2.7, libc6" )
SET ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.hyperion-project.org" )
SET ( CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5core5a (>= 5.2.0), libqt5network5 (>= 5.2.0), libqt5gui5 (>= 5.2.0), libqt5serialport5 (>= 5.2.0), libavahi-core-dev (>= 0.6.0), libavahi-compat-libdnssd-dev (>= 0.6.0), libusb-1.0-0, libpython2.7, libc6" )
SET ( CPACK_DEBIAN_PACKAGE_SECTION "Miscellaneous" )
SET ( CPACK_RPM_PACKAGE_NAME "hyperion" )
SET ( CPACK_RPM_PACKAGE_NAME "Hyperion" )
SET ( CPACK_RPM_PACKAGE_URL "https://github.com/hyperion-project/hyperion" )
SET ( CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/rpm/postinst" )
@ -22,7 +22,7 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "${HYPERION_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${HYPERION_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${HYPERION_VERSION_PATCH}")
SET ( CPACK_COMPONENTS_ALL ambilight )
SET ( CPACK_COMPONENTS_ALL "${PLATFORM}" )
SET ( CPACK_ARCHIVE_COMPONENT_INSTALL ON )
SET ( CPACK_DEB_COMPONENT_INSTALL ON )
SET ( CPACK_RPM_COMPONENT_INSTALL ON )

View File

@ -40,4 +40,4 @@ target_link_libraries(${PROJECT_NAME}
qt5_use_modules(${PROJECT_NAME} Core Gui Network)
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )

View File

@ -42,4 +42,4 @@ target_link_libraries( ${PROJECT_NAME}
qt5_use_modules(${PROJECT_NAME} Core Gui Network)
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )

View File

@ -40,4 +40,4 @@ target_link_libraries( ${PROJECT_NAME}
qt5_use_modules(${PROJECT_NAME} Core Gui Network)
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )

View File

@ -40,4 +40,4 @@ target_link_libraries( ${PROJECT_NAME}
qt5_use_modules(${PROJECT_NAME} Core Gui Network)
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )

View File

@ -34,5 +34,4 @@ target_link_libraries(${PROJECT_NAME}
qt5_use_modules(${PROJECT_NAME} Gui Core Network)
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )

View File

@ -45,4 +45,4 @@ target_link_libraries(${PROJECT_NAME}
qt5_use_modules(${PROJECT_NAME} Core Gui Network)
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )

View File

@ -43,4 +43,4 @@ target_link_libraries(${PROJECT_NAME}
qt5_use_modules(${PROJECT_NAME} Core Gui Network)
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )

View File

@ -39,8 +39,8 @@ if (ENABLE_X11)
target_link_libraries(hyperiond x11-grabber )
endif ()
install ( TARGETS hyperiond DESTINATION "bin" COMPONENT ambilight )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "share/hyperion/" COMPONENT ambilight )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" COMPONENT ambilight )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/config DESTINATION "share/hyperion/" COMPONENT ambilight )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/assets/webconfig DESTINATION "share/hyperion/" COMPONENT ambilight )
install ( TARGETS hyperiond DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "share/hyperion/" COMPONENT "${PLATFORM}" )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" COMPONENT "${PLATFORM}" )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/config DESTINATION "share/hyperion/" COMPONENT "${PLATFORM}" )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/assets/webconfig DESTINATION "share/hyperion/" COMPONENT "${PLATFORM}" )