File: checksums.cmake

package info (click to toggle)
wxmaxima 20.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 46,476 kB
  • sloc: cpp: 77,833; xml: 10,445; ansic: 3,583; lisp: 1,837; makefile: 13; sh: 7
file content (34 lines) | stat: -rw-r--r-- 2,027 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Create checksums for source and binary packages.
# "make package" and "make package_source" must be run before "make checksums" to get them.

message (STATUS "Packages must be generated using 'make package' and 'make package_source' before")
file(REMOVE "checksums-md5.txt")
file(REMOVE "checksums-sha1.txt")
file(REMOVE "checksums-sha256.txt")
file(REMOVE "checksums-sha512.txt")
# Binary packages
foreach(ext "tar.gz" "tar.bz2" "deb" "rpm")
    if(EXISTS "wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext}")
        file(MD5 wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext} hashvalue)    
        file(APPEND "checksums-md5.txt" "${hashvalue}  wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext}\n")
        file(SHA1 wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext} hashvalue)    
        file(APPEND "checksums-sha1.txt" "${hashvalue}  wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext}\n")
        file(SHA256 wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext} hashvalue)    
        file(APPEND "checksums-sha256.txt" "${hashvalue}  wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext}\n")
        file(SHA512 wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext} hashvalue)    
        file(APPEND "checksums-sha512.txt" "${hashvalue}  wxmaxima-${VERSION}-${CMAKE_SYSTEM_NAME}.${ext}\n")
    endif()
endforeach()
# Source packages
foreach(ext "tar.gz" "tar.bz2" "tar.xz" "tar.Z")
    if(EXISTS "wxmaxima-${VERSION}.${ext}")
        file(MD5 wxmaxima-${VERSION}.${ext} hashvalue)    
        file(APPEND "checksums-md5.txt" "${hashvalue}  wxmaxima-${VERSION}.${ext}\n")
        file(SHA1 wxmaxima-${VERSION}.${ext} hashvalue)    
        file(APPEND "checksums-sha1.txt" "${hashvalue}  wxmaxima-${VERSION}.${ext}\n")
        file(SHA256 wxmaxima-${VERSION}.${ext} hashvalue)    
        file(APPEND "checksums-sha256.txt" "${hashvalue}  wxmaxima-${VERSION}.${ext}\n")
        file(SHA512 wxmaxima-${VERSION}.${ext} hashvalue)    
        file(APPEND "checksums-sha512.txt" "${hashvalue}  wxmaxima-${VERSION}.${ext}\n")
    endif()
endforeach()