# Default scoring
LIBSCORE_SAMPLE := myscoring
-LIBSCORE_SAMPLE_LIBRARY := libmyscoring.so
-LIBSCORE_SAMPLE_VER := 1.0.1
LIBSCORE_SAMPLE_CONF := myscoring.conf
LIBSCORE_SAMPLE_DIR := $(LIBPKG_SAMPLE_DIR)/$(LIBSCORE_SAMPLE)
LIBSCORE_SAMPLE_2 := myscoring2
-LIBSCORE_SAMPLE_2_LIBRARY := libmyscoring2.so
-LIBSCORE_SAMPLE_2_VER := 1.0.1
LIBSCORE_SAMPLE_2_CONF := myscoring2.conf
LIBSCORE_SAMPLE_2_DIR := $(LIBPKG_SAMPLE_DIR)/$(LIBSCORE_SAMPLE_2)
install -d $(DESTDIR)/usr/lib
install -d $(DESTDIR)/usr/include/$(PKG_NAME)
install -d $(DESTDIR)/usr/lib/pkgconfig
-
- install -m 644 $(LIBPKG_LIB_DIR)/$(LIBPKG_LIB_FILE).* $(DESTDIR)/usr/lib
- cp -r $(LIBPKG_LIB_DIR)/$(LIBPKG_LIB_FILE) $(DESTDIR)/usr/lib
+ install -m 755 $(LIBPKG_LIB_DIR)/$(LIBPKG_LIB_FILE) $(DESTDIR)/usr/lib
install -m 644 $(BASE_DIR)/$(PKG_NAME).pc.in $(DESTDIR)/usr/lib/pkgconfig/$(PKG_NAME).pc
install -m 644 $(LIBPKG_INC_DIR)/$(LIBPKG_HEADER_FILE) $(DESTDIR)/usr/include/$(PKG_NAME)
install -d $(DESTDIR)/$(TARGET_LIBSCORE_DIR)/$(LIBSCORE_SAMPLE)
install -d $(DESTDIR)/$(TARGET_LIBSCORE_DIR)/$(LIBSCORE_SAMPLE_2)
install -m 644 $(LIBSCORE_SAMPLE_DIR)/$(LIBSCORE_SAMPLE_CONF) $(DESTDIR)/$(TARGET_LIBSCORE_DIR)/$(LIBSCORE_SAMPLE)/
- install -m 644 $(LIBSCORE_SAMPLE_DIR)/$(LIBSCORE_SAMPLE_LIBRARY).$(LIBSCORE_SAMPLE_VER) $(DESTDIR)/$(TARGET_LIBSCORE_DIR)/$(LIBSCORE_SAMPLE)/
install -m 644 $(LIBSCORE_SAMPLE_2_DIR)/$(LIBSCORE_SAMPLE_2_CONF) $(DESTDIR)/$(TARGET_LIBSCORE_DIR)/$(LIBSCORE_SAMPLE_2)/
- install -m 644 $(LIBSCORE_SAMPLE_2_DIR)/$(LIBSCORE_SAMPLE_2_LIBRARY).$(LIBSCORE_SAMPLE_2_VER) $(DESTDIR)/$(TARGET_LIBSCORE_DIR)/$(LIBSCORE_SAMPLE_2)/
## c test and coverage
test:
SRC_DIR := src
SAMPLE_DIR := sample
LIBRARY_FILE := liborchestration-client.so
-LIBRARY_VERSION := 0.1.0
SRC_FILES := \
$(SRC_DIR)/orchestration_client.c \
$(SRC_DIR)/dbus_consumer.c
build:
mkdir -p $(LIB_DIR)
$(CC) -fPIC -Wall -c -I $(INC_DIR) `pkg-config --libs --cflags gio-2.0 gio-unix-2.0 glib-2.0` $(SRC_FILES)
- $(CC) -shared -g -Wall -Werror $(OBJ_FILES) -o $(LIB_DIR)/$(LIBRARY_FILE).$(LIBRARY_VERSION) -I $(INC_DIR)
- ln -sf $(LIBRARY_FILE).$(LIBRARY_VERSION) $(LIB_DIR)/$(LIBRARY_FILE)
+ $(CC) -shared -g -Wall -Werror $(OBJ_FILES) -o $(LIB_DIR)/$(LIBRARY_FILE) -I $(INC_DIR)
-rm -f $(OBJ_FILES)
clean:
ServiceName=list_segments ; Name of distributed service
[ScoringMethod]
-LibFile=./libmyscoring.so ; Library file name
-FunctionName=myscoring
-
-[ResourceType]
IntervalTimeMs=1000 ; Interval time of get resource
-MaxCount=10 ; Number of times
ServiceName=org.tizen.chromium-efl ; Name of distributed service
[ScoringMethod]
-LibFile=./libmyscoring.so ; Library file name
-FunctionName=myscoring
-
-[ResourceType]
IntervalTimeMs=1000 ; Interval time of get resource
-MaxCount=10 ; Number of times
systemctl daemon-reload
systemctl restart %{name}
-%post -n libedge-orchestration-devel
-ln -sf %{_sysconfdir}/%{name}/apps/myscoring/libmyscoring.so.1.0.1 %{_sysconfdir}/%{name}/apps/myscoring/libmyscoring.so
-ln -sf %{_sysconfdir}/%{name}/apps/myscoring2/libmyscoring2.so.1.0.1 %{_sysconfdir}/%{name}/apps/myscoring2/libmyscoring2.so
%files
%manifest %{name}.manifest
%files -n libedge-orchestration
%manifest lib%{name}.manifest
%license LICENSE.Apache-2.0
-%attr(755,system_fw,system_fw)%{_libdir}/liborchestration-client.so.*
+%attr(755,system_fw,system_fw)%{_libdir}/liborchestration-client.so
%files -n libedge-orchestration-devel
-%attr(755,system_fw,system_fw)%{_libdir}/liborchestration-client.so
%attr(755,system_fw,system_fw)%{_libdir}/pkgconfig/%{name}.pc
%attr(755,system_fw,system_fw)%{_includedir}/%{name}/orchestration_client.h
# orchestration sample