]> granicus.if.org Git - graphviz/commitdiff
Add generation of an RPM package from Centos and Fedora CMake builds
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Tue, 6 Oct 2020 05:50:02 +0000 (07:50 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 15 Oct 2020 16:10:45 +0000 (18:10 +0200)
ci/build.sh
cmake/package_info.cmake

index 41439c2ea1b9c913b12f670dd9bedd1639049b4c..64aff724238fc89bee29fbb473daa65e447a4b60 100755 (executable)
@@ -35,6 +35,8 @@ if [ "${build_system}" = "cmake" ]; then
         mv build/*.deb ${DIR}/os/${ARCH}/
     elif [ "${ID}" = "Darwin" ]; then
         mv build/*.zip ${DIR}/os/${ARCH}/
+    else
+        mv build/*.rpm ${DIR}/os/${ARCH}/
     fi
 else
     if [ "${ID_LIKE}" = "debian" ]; then
index 701aff56193767e0b648256c7f736cf0d5d15e37..3efc2dbb2d8f5f31ee4c981df320cc1cec6968a7 100644 (file)
@@ -13,7 +13,14 @@ set(CPACK_GENERATOR ZIP)
 
 if (UNIX)
     if (NOT APPLE)
-        LIST(APPEND CPACK_GENERATOR DEB)
+        if (EXISTS "/etc/os-release")
+            file(READ "/etc/os-release" OS_RELEASE)
+            if ("${OS_RELEASE}" MATCHES "ID_LIKE=debian")
+                LIST(APPEND CPACK_GENERATOR DEB)
+            else()
+                LIST(APPEND CPACK_GENERATOR RPM)
+            endif()
+        endif()
     endif()
 endif()