if (HICNET)
find_package(Libhicnet REQUIRED)
- set (TRANSPORT_LIBRARY HICNET)
+ set(TRANSPORT_LIBRARY HICNET)
set(ICNET OFF)
+ set(PREFIX "hicn-")
else()
find_package(Libicnet REQUIRED)
- set (TRANSPORT_LIBRARY ICNET)
+ set(TRANSPORT_LIBRARY ICNET)
+ set(PREFIX "")
endif()
configure_file("${PROJECT_SOURCE_DIR}/config.h.in"
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS} -fpermissive")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS} -fpermissive")
-add_executable(http-server ${SOURCE_FILES})
-target_link_libraries(http-server ${LIB${TRANSPORT_LIBRARY}_LIBRARY} ${CURL_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+add_executable(${PREFIX}http-server ${SOURCE_FILES})
+target_link_libraries(${PREFIX}http-server ${LIB${TRANSPORT_LIBRARY}_LIBRARY} ${CURL_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
-install(TARGETS http-server DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+install(TARGETS ${PREFIX}http-server DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
# Generate DEB / RPM packages
set(ARCHITECTURE "amd64" CACHE STRING "Architecture")
set(PACKAGE_MAINTAINER "Mauro Sardara (
[email protected])" CACHE STRING "Maintainer")
set(BUILD_NUMBER "1" CACHE STRING "Build Number")
-string(TOLOWER ${CMAKE_PROJECT_NAME} PACKAGE_NAME)
+string(TOLOWER ${PREFIX}${CMAKE_PROJECT_NAME} PACKAGE_NAME)
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
set(CPACK_PACKAGE_VENDOR ${VENDOR})
return()
endif ()
+# Install also configuration files
+set (HTTP_SERVER_SERVICE ${PROJECT_SOURCE_DIR}/config/${PREFIX}http-server.service)
+install(FILES ${HTTP_SERVER_SERVICE} DESTINATION /lib/systemd/system RENAME ${PREFIX}http-server.service)
+
set(CPACK_GENERATOR ${GENERATOR})
set(CPACK_${TYPE}_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER})
set(CPACK_${TYPE}_PACKAGE_NAME ${PACKAGE_NAME})
- Ubuntu 14.04 (x86_64)
- Debian Testing
- MacOSX 10.12
- - CentOS 7
+ - CentOS 7
\ No newline at end of file
--- /dev/null
+# Copyright (c) 2015, Cisco Systems
+#
+# This file is part of the NDN connectivity-manager.
+# See AUTHORS.md for complete list of authors and contributors.
+#
+# This program is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+#
+
+[Unit]
+Description=Http Server using tcp/icn as tranport protocol
+#Documentation=man:http-server
+Requires=hicn-forwarder.service
+
+[Service]
+ExecStart=/usr/bin/hicn-http-server
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+# Copyright (c) 2015, Cisco Systems
+#
+# This file is part of the NDN connectivity-manager.
+# See AUTHORS.md for complete list of authors and contributors.
+#
+# This program is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+#
+
+[Unit]
+Description=Http Server using tcp/icn as tranport protocol
+#Documentation=man:http-server
+Requires=metis-forwarder.service
+
+[Service]
+ExecStart=/usr/bin/http-server
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target