Browse Source

CPackDeb: Loosen filename requirement to allow for .ipk

The OPKG packaging system uses deb like package files with
an .ipk extension. Allow the DEB generator to be used in that context.
Nils Gladitz 8 years ago
parent
commit
a17ef5748a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Modules/CPackDeb.cmake

+ 4 - 3
Modules/CPackDeb.cmake

@@ -73,7 +73,8 @@
 #
 #
 #    <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
 #    <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
 #
 #
-#  Alternatively provided package file name must end with ``.deb`` suffix.
+#  Alternatively provided package file name must end
+#  with either ``.deb`` or ``.ipk`` suffix.
 #
 #
 #  .. note::
 #  .. note::
 #
 #
@@ -977,9 +978,9 @@ function(cpack_deb_prepare_package_vars)
     else()
     else()
       cmake_policy(PUSH)
       cmake_policy(PUSH)
         cmake_policy(SET CMP0010 NEW)
         cmake_policy(SET CMP0010 NEW)
-        if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.deb")
+        if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.(deb|ipk)")
       cmake_policy(POP)
       cmake_policy(POP)
-          message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb'!")
+          message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb' or '.ipk'!")
         endif()
         endif()
       cmake_policy(POP)
       cmake_policy(POP)