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
+
+ 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 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)
%package -n libedge-orchestration-devel
Summary: edge-orchestration library for (devel)
Group: System/Edge Framework
-Requires: %{name} = %{version}-%{release}
+Requires: libedge-orchestration = %{version}-%{release}
%description -n libedge-orchestration-devel
Edge orchestration library for use of Edge-orchestration (devel)
systemctl daemon-reload
systemctl restart %{name}
-%post -n libedge-orchestration
+%post -n libedge-orchestration-devel
ln -sf %{_sysconfdir}/%{name}/myscoring/libmyscoring.so.1.0.1 %{_sysconfdir}/%{name}/myscoring/libmyscoring.so
ln -sf %{_sysconfdir}/%{name}/myscoring2/libmyscoring2.so.1.0.1 %{_sysconfdir}/%{name}/myscoring2/libmyscoring2.so
%files -n libedge-orchestration
%manifest lib%{name}.manifest
%license LICENSE.Apache-2.0
+%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
%attr(755,system_fw,system_fw)%{_bindir}/orchestration_sample
%attr(755,system_fw,system_fw)%{_bindir}/orchestration_chrome_sample
%attr(755,system_fw,system_fw)%{_sysconfdir}/%{name}/myscoring/*
%attr(755,system_fw,system_fw)%{_sysconfdir}/%{name}/myscoring2/*
-
-%files -n libedge-orchestration-devel
-%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}/pkgconfig/%{name}.pc
-%attr(755,system_fw,system_fw)%{_includedir}/%{name}/orchestration_client.h
\ No newline at end of file
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) -I $(INC_DIR)
+ $(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)
-rm -f $(OBJ_FILES)
clean: