From 394facf99311e3383d90294758c19f9193647682 Mon Sep 17 00:00:00 2001 From: Gustavo Lima Chaves Date: Thu, 24 Sep 2015 15:33:35 -0300 Subject: [PATCH] Adapt spec to work on rawhide too. Other fixes that come together: This involves shipping two config files, to be chosen at build time, depending on the environment. - fixed release tag to be conformant to Fedora naming - fixed source URLs to be conformant to Fedora policies --- rpm/{config => config-linux-micro} | 16 +- rpm/config-systemd | 292 +++++++++++++++++++++++++++++ rpm/soletta.spec | 30 +-- 3 files changed, 321 insertions(+), 17 deletions(-) rename rpm/{config => config-linux-micro} (95%) create mode 100644 rpm/config-systemd diff --git a/rpm/config b/rpm/config-linux-micro similarity index 95% rename from rpm/config rename to rpm/config-linux-micro index fa2792c..e714856 100644 --- a/rpm/config +++ b/rpm/config-linux-micro @@ -18,16 +18,16 @@ HAVE_DLFCN_H=y HAVE_DOXYGEN=y HAVE_DUKTAPE_SRC=y HAVE_FLTO=y -HAVE_GENHTML=y +# HAVE_GENHTML is not set HAVE_GETRANDOM=y HAVE_GLIB=y HAVE_GNU_SOURCE=y -HAVE_GRAPHVIZ=y +# HAVE_GRAPHVIZ is not set HAVE_GTK=y HAVE_ICU=y -HAVE_IMAGEMAGICK=y +# HAVE_IMAGEMAGICK is not set HAVE_ISATTY=y -HAVE_LCOV=y +# HAVE_LCOV is not set HAVE_LDL=y HAVE_LIBCURL=y # HAVE_LIBMICROHTTPD is not set @@ -35,6 +35,7 @@ HAVE_LIBPCRE=y HAVE_LIB_MATH=y HAVE_LINUX=y HAVE_LOCALE=y +HAVE_MOSQUITTO=y HAVE_NEWLOCALE=y HAVE_NO_SANITIZE=y HAVE_PPOLL=y @@ -42,7 +43,7 @@ HAVE_PTHREAD_H=y HAVE_RANDOM_R=y # HAVE_RIOTOS is not set # HAVE_SANITIZE_ADDRESS is not set -HAVE_SANITIZE_UNDEFINED=y +# HAVE_SANITIZE_UNDEFINED is not set # HAVE_SD_DBUS is not set HAVE_SOCKET=y HAVE_STRTOD_L=y @@ -50,7 +51,7 @@ HAVE_STRTOD_L=y HAVE_SYS_AUXV_H=y HAVE_TAR=y HAVE_UDEV=y -HAVE_VALGRIND=y +# HAVE_VALGRIND is not set FEATURE_DYNAMIC_LINKER=y FEATURE_RUNNABLE_PROGRAMS=y FEATURE_WORKER_THREADS=y @@ -240,6 +241,7 @@ FLOW_C_API_SIMPLECTYPE_SAMPLE=n FLOW_COMPASS_LSM303_SAMPLE=n FLOW_FOOSBALL_SAMPLE=n FLOW_IIO_SAMPLE=n +FLOW_IO_SAMPLE=n FLOW_GALILEO_GROVE_BUTTON_SAMPLE=n FLOW_GALILEO_GROVE_LED_ACCUMULATOR_SAMPLE=n FLOW_GALILEO_GROVE_RELAY_SAMPLE=n @@ -263,7 +265,9 @@ FLOW_CALAMARI_RGB_LED_SAMPLE=n FLOW_MISC_FILE_COPY_SAMPLE=n FLOW_MISC_RANDOM_NUMBERS_SAMPLE=n FLOW_MISC_TICKETS_QUEUE_SAMPLE=n +FLOW_OIC_SAMPLE=n FLOW_TRASH_DISPOSER=n +FLOW_UNIX_SOCKET_SAMPLE=n # # Tools diff --git a/rpm/config-systemd b/rpm/config-systemd new file mode 100644 index 0000000..4b841f8 --- /dev/null +++ b/rpm/config-systemd @@ -0,0 +1,292 @@ +# +# Automatically generated file; DO NOT EDIT. +# Soletta configuration +# +HAVE_ACCEPT4=y +HAVE_BUILTIN_ADD_OVERFLOW=y +HAVE_BUILTIN_MUL_OVERFLOW=y +HAVE_BZIP2=y +HAVE_CHECK=y +HAVE_CHRPATH=y +# HAVE_CONTIKI is not set +HAVE_DECL_DLADDR=y +HAVE_DECL_IFLA_INET6_ADDR_GEN_MODE=y +HAVE_DECL_IFLA_INET6_MAX=y +HAVE_DECL_MEMMEM=y +HAVE_DECL_STRNDUPA=y +HAVE_DLFCN_H=y +HAVE_DOXYGEN=y +HAVE_DUKTAPE_SRC=y +HAVE_FLTO=y +# HAVE_GENHTML is not set +HAVE_GETRANDOM=y +HAVE_GLIB=y +HAVE_GNU_SOURCE=y +# HAVE_GRAPHVIZ is not set +HAVE_GTK=y +HAVE_ICU=y +# HAVE_IMAGEMAGICK is not set +HAVE_ISATTY=y +# HAVE_LCOV is not set +HAVE_LDL=y +HAVE_LIBCURL=y +# HAVE_LIBMICROHTTPD is not set +HAVE_LIBPCRE=y +HAVE_LIB_MATH=y +HAVE_LINUX=y +HAVE_LOCALE=y +HAVE_MOSQUITTO=y +HAVE_NEWLOCALE=y +HAVE_NO_SANITIZE=y +HAVE_PPOLL=y +HAVE_PTHREAD_H=y +HAVE_RANDOM_R=y +# HAVE_RIOTOS is not set +# HAVE_SANITIZE_ADDRESS is not set +# HAVE_SANITIZE_UNDEFINED is not set +HAVE_SD_DBUS=y +HAVE_SOCKET=y +HAVE_STRTOD_L=y +HAVE_SYSTEMD=y +HAVE_SYS_AUXV_H=y +HAVE_TAR=y +HAVE_UDEV=y +# HAVE_VALGRIND is not set +FEATURE_DYNAMIC_LINKER=y +FEATURE_RUNNABLE_PROGRAMS=y +FEATURE_WORKER_THREADS=y +FEATURE_UNIX_SOCKETS=y +FEATURE_NETWORK=y +FEATURE_COAP=y +FEATURE_HTTP_CLIENT=y +FEATURE_HW_AIO=y +FEATURE_HW_PWM=y +FEATURE_HW_GPIO=y +FEATURE_HW_UART=y +FEATURE_HW_SPI=y +FEATURE_HW_I2C=y +FEATURE_FLOW=y +FEATURE_FILESYSTEM=y +FEATURE_CC_SANITIZE=y +BASE_OS="linux" +LINUX=y + +# +# Basic +# +SHARED_LIBRARY=y +# STATIC_LIBRARY is not set +ENABLE_DYNAMIC_MODULES=y +MODULES=y +PREFIX="/usr" +RPATH=y + +# +# Compiler options +# +# BUILD_TYPE_DEBUG is not set +BUILD_TYPE_RELEASE=y +CONFIG_CFLAGS="-g" +CONFIG_LDFLAGS="" +CC_SANITIZE=n +CC_SANITIZE_UNDEFINED=n + +# +# Core library +# +BOARD_NAME="" +DETECT_BOARD_NAME=y +PLATFORM_LINUX=y +# PLATFORM_DUMMY is not set +# PLATFORM_LINUX_MICRO is not set +PLATFORM_SYSTEMD=y +SOL_BUS=y +# MAINLOOP_GLIB is not set +MAINLOOP_POSIX=y +PTHREAD=y +WORKER_THREAD=y +LOG=y +# MAXIMUM_LOG_LEVEL_CRITICAL is not set +# MAXIMUM_LOG_LEVEL_ERROR is not set +# MAXIMUM_LOG_LEVEL_WARNING is not set +# MAXIMUM_LOG_LEVEL_INFO is not set +# MAXIMUM_LOG_LEVEL_DEBUG is not set +MAXIMUM_LOG_LEVEL_UNLIMITED=y + +# +# Hardware Options +# +USE_AIO=y +USE_PWM=y +USE_SPI=y +USE_UART=y +USE_I2C=y +USE_GPIO=y +USE_PIN_MUX=y +PIN_MUX_INTEL_GALILEO_REV_D=m +PIN_MUX_INTEL_GALILEO_REV_G=m +PIN_MUX_INTEL_EDISON_REV_C=m + +# +# Flow Based Programming (FBP) +# +FLOW_SUPPORT=y +NODE_DESCRIPTION=y +RESOLVER_CONFFILE=y +INSPECTOR=y + +# +# Metatypes +# +FLOW_METATYPE_JAVASCRIPT=m + +# +# Node Types +# +FLOW_NODE_TYPE_ACCELEROMETER=m +FLOW_NODE_TYPE_AIO=y +FLOW_NODE_TYPE_AM2315=m +FLOW_NODE_TYPE_APP=y +FLOW_NODE_TYPE_BOOLEAN=y +FLOW_NODE_TYPE_BYTE=y +FLOW_NODE_TYPE_CALAMARI=m +FLOW_NODE_TYPE_COLOR=y +FLOW_NODE_TYPE_COMPASS=m +FLOW_NODE_TYPE_CONSOLE=y +FLOW_NODE_TYPE_CONSTANT=y +FLOW_NODE_TYPE_CONVERTER=y +FLOW_NODE_TYPE_EVDEV=m +FLOW_NODE_TYPE_FLOWER_POWER=m +FLOW_NODE_TYPE_FILE=m +FLOW_NODE_TYPE_FILTER_REPEATED=y +FLOW_NODE_TYPE_FLOAT=y +FLOW_NODE_TYPE_LOCATION=m +FLOW_NODE_TYPE_GPIO=y +FLOW_NODE_TYPE_GROVE=m +FLOW_NODE_TYPE_GTK=m +FLOW_NODE_TYPE_GYROSCOPE=m +FLOW_NODE_TYPE_IIO=m +FLOW_NODE_TYPE_INT=y +FLOW_NODE_TYPE_KEYBOARD=m +FLOW_NODE_TYPE_LED_7SEG=y +FLOW_NODE_TYPE_LED_STRIP=m +FLOW_NODE_TYPE_MAGNETOMETER=m +FLOW_NODE_TYPE_MAX31855=m +FLOW_NODE_TYPE_NETWORK=m +FLOW_NODE_TYPE_OIC=m +FLOW_NODE_TYPE_PERSISTENCE=m +FLOW_NODE_TYPE_PIEZO_SPEAKER=m +FLOW_NODE_TYPE_PLATFORM=y +FLOW_NODE_TYPE_PROCESS=m +FLOW_NODE_TYPE_PWM=y +FLOW_NODE_TYPE_RANDOM=y +FLOW_NODE_TYPE_SERVO_MOTOR=m +FLOW_NODE_TYPE_STRING=y +USE_ICU=y +USE_LIBPCRE=y +FLOW_NODE_TYPE_SWITCHER=y +FLOW_NODE_TYPE_TEMPERATURE=y +FLOW_NODE_TYPE_TEST=m +FLOW_NODE_TYPE_THINGSPEAK=m +FLOW_NODE_TYPE_TIMER=y +FLOW_NODE_TYPE_TIMESTAMP=y +FLOW_NODE_TYPE_TRIGONOMETRY=y +FLOW_NODE_TYPE_UDEV=m +FLOW_NODE_TYPE_UNIX_SOCKET=m +FLOW_NODE_TYPE_WALLCLOCK=y + +# +# Networking +# +NETWORK=y +COAP=y +OIC=y +HTTP=y +HTTP_CLIENT=y +MQTT=y + +# +# Samples +# +COAP_SAMPLES=n +COAP_CLIENT_SERVER_SAMPLES=n +OIC_SAMPLES=n +COMMON_SAMPLES=n +PLATFORM_SIMPLE_SAMPLE=n +UART_SAMPLE=n +MQTT_SAMPLES=n +MQTT_PUBLISH_SUBSCRIBE_SAMPLES=n +FLOW_SAMPLES=n +FLOW_FBP_GENERATOR_SAMPLES=n +FLOW_BASICS_CMDLINE_ARGS_SAMPLE=n +FLOW_BASICS_FIBONACCI_SAMPLE=n +FLOW_BASICS_PLATORM_SERVICE_SAMPLE=n +FLOW_BASICS_SIMPLE_SAMPLE=n +FLOW_BASICS_SUBPROCESS_BC_SAMPLE=n +FLOW_C_API_CUSTOM_NODE_TYPES_SAMPLE=n +FLOW_C_API_HIGHLEVEL_SAMPLE=n +FLOW_C_API_LOWLEVEL_SAMPLE=n +FLOW_C_API_SIMPLECTYPE_SAMPLE=n +FLOW_COMPASS_LSM303_SAMPLE=n +FLOW_FOOSBALL_SAMPLE=n +FLOW_IIO_SAMPLE=n +FLOW_IO_SAMPLE=n +FLOW_GALILEO_GROVE_BUTTON_SAMPLE=n +FLOW_GALILEO_GROVE_LED_ACCUMULATOR_SAMPLE=n +FLOW_GALILEO_GROVE_RELAY_SAMPLE=n +FLOW_GALILEO_GROVE_SOUND_SENSOR_SAMPLE=n +FLOW_GALILEO_GROVE_LCD_AUTOSCROLL_SAMPLE=n +FLOW_GALILEO_GROVE_LCD_BLINK_SAMPLE=n +FLOW_GALILEO_GROVE_LCD_CURSOR_SAMPLE=n +FLOW_GALILEO_GROVE_LCD_DISPLAY_SAMPLE=n +FLOW_GALILEO_GROVE_LCD_HELLO_WORLD_SAMPLE=n +FLOW_GALILEO_GROVE_LCD_SCROLL_SAMPLE=n +FLOW_GALILEO_GROVE_LCD_SET_CURSOR_SAMPLE=n +FLOW_GALILEO_GROVE_LCD_TEXT_DIRECTION_SAMPLE=n +FLOW_GTK_GALLERY_SAMPLE=n +FLOW_LD_STRIP_LPD8806_SAMPLE=n +FLOW_CALAMARI_7SEG_SEGMENTS_SAMPLE=n +FLOW_CALAMARI_7SEG_VALUE_SAMPLE=n +FLOW_CALAMARI_BUTTONS_RGB_LED_SAMPLE=n +FLOW_CALAMARI_LED_SAMPLE=n +FLOW_CALAMARI_LEVER_SAMPLE=n +FLOW_CALAMARI_RGB_LED_SAMPLE=n +FLOW_MISC_FILE_COPY_SAMPLE=n +FLOW_MISC_RANDOM_NUMBERS_SAMPLE=n +FLOW_MISC_TICKETS_QUEUE_SAMPLE=n +FLOW_OIC_SAMPLE=n +FLOW_TRASH_DISPOSER=n +FLOW_UNIX_SOCKET_SAMPLE=n + +# +# Tools +# +FBP_GENERATOR=y +FBP_RUNNER=y +FBP_TO_DOT=y +FLOW_NODE_TYPES=y + +# +# Test suite +# +TEST_ARENA=n +TEST_BUFFER=n +TEST_COAP=n +TEST_FBP=n +TEST_FBP_SCANNER=n +TEST_FLOW=n +TEST_FLOW_BUILDER=n +TEST_FLOW_PARSER=n +TEST_JAVASCRIPT=n +TEST_MAINLOOP=n +TEST_MAINLOOP_LINUX=n +TEST_MAINLOOP_THREADS=n +TEST_MAINLOOP_THREADS_SOL_RUN=n +TEST_MAINLOOP_GLIB_INTEGRATION=n +TEST_MONITORS=n +TEST_STR_SLICE=n +TEST_STR_SPLIT=n +TEST_STR_TABLE=n +TEST_VECTOR=n +TEST_JSON=n +TEST_UTIL=n diff --git a/rpm/soletta.spec b/rpm/soletta.spec index e50f0d2..2c6293c 100644 --- a/rpm/soletta.spec +++ b/rpm/soletta.spec @@ -1,19 +1,20 @@ %global soletta_major 0 %global soletta_minor 0 %global soletta_build 1 -%global soletta_release beta5 +%global soletta_tag beta5 -%global soletta_duktape_release beta2 +%global soletta_duktape_tag beta2 Summary: A framework for making IoT devices Name: soletta Version: %{soletta_major}.%{soletta_minor}.%{soletta_build} -Release: %{soletta_release}%{?dist} +Release: 0.1.%{soletta_tag}%{?dist} License: BSD URL: http://github.com/solettaproject/soletta -Source0: https://github.com/solettaproject/soletta/archive/v1_%{soletta_release}.tar.gz -Source1: https://github.com/solettaproject/duktape-release/archive/v1_%{soletta_duktape_release}.tar.gz -Source2: config +Source0: https://github.com/solettaproject/%{name}/archive/v1_%{soletta_tag}.tar.gz#/%{name}-%{version}.tar.gz +Source1: https://github.com/solettaproject/duktape-release/archive/v1_%{soletta_duktape_tag}.tar.gz#/%{name}-duktape-%{version}.tar.gz +Source2: config-linux-micro +Source3: config-systemd BuildRequires: gtk3-devel BuildRequires: libcurl-devel BuildRequires: libicu-devel @@ -329,13 +330,18 @@ using %{name}, you will need to install %{name}-devel. # This package contains the development documentation for %%{name}. %prep -%setup -n %{name}-1_%{soletta_release} -q -%setup -T -D -a 1 -n %{name}-1_%{soletta_release} -q -mv duktape-release-1_%{soletta_duktape_release}/* src/thirdparty/duktape + +%setup -qn %{name}-1_%{soletta_tag} +%setup -T -D -a 1 -qn %{name}-1_%{soletta_tag} +mv duktape-release-1_%{soletta_duktape_tag}/* src/thirdparty/duktape %build export LIBDIR=%{_libdir}/ +%if 0%{?fedora} < 23 cp %{SOURCE2} .config +%else +cp %{SOURCE3} .config +%endif make silentoldconfig make CFLAGS="$CFLAGS %optflags" LDFLAGS="$LDFLAGS %__global_ldflags" %{?_smp_mflags} @@ -358,8 +364,9 @@ make CFLAGS="$CFLAGS %optflags" LDFLAGS="$LDFLAGS %__global_ldflags" %{?_smp_mfl %dir %{_libdir}/soletta/modules %dir %{_libdir}/soletta/modules/flow %dir %{_libdir}/soletta/modules/flow-metatype -%dir %{_libdir}/soletta/modules/linux-micro %dir %{_libdir}/soletta/modules/pin-mux +%if 0%{?fedora} < 23 +%dir %{_libdir}/soletta/modules/linux-micro %{_libdir}/soletta/modules/linux-micro/initial-services %{_libdir}/soletta/modules/linux-micro/bluetooth.so %{_libdir}/soletta/modules/linux-micro/console.so @@ -372,6 +379,7 @@ make CFLAGS="$CFLAGS %optflags" LDFLAGS="$LDFLAGS %__global_ldflags" %{?_smp_mfl %{_libdir}/soletta/modules/linux-micro/rc-d.so %{_libdir}/soletta/modules/linux-micro/sysctl.so %{_libdir}/soletta/modules/linux-micro/watchdog.so +%endif %license COPYING @@ -534,5 +542,5 @@ make CFLAGS="$CFLAGS %optflags" LDFLAGS="$LDFLAGS %__global_ldflags" %{?_smp_mfl # %%doc %%{_mandir}/man3/* %changelog -* Tue Sep 2 2015 Gustavo Lima Chaves - 0.0.1-beta5 +* Thu Sep 24 2015 Gustavo Lima Chaves - 0.0.1-beta5 - first build for Fedora 22