libdeflate 1.8
[git/cygwin-packages/libdeflate.git] / libdeflate.cygport
1 ################################
2 NAME=libdeflate
3 VERSION=1.8
4 RELEASE=1
5
6 ################################
7 CATEGORY="Archive"
8 SUMMARY="A library for fast, whole-buffer DEFLATE-based compression and decompression"
9 DESCRIPTION="\
10 libdeflate is a library for fast, whole-buffer DEFLATE-based
11 compression and decompression.
12 The supported formats are:
13 DEFLATE (raw),
14 zlib (a.k.a. DEFLATE with a zlib wrapper),
15 gzip (a.k.a. DEFLATE with a gzip wrapper).
16 libdeflate is heavily optimized. It is significantly faster than
17 the zlib library, both for compression and decompression, and
18 especially on x86 processors. In addition, libdeflate provides
19 optional high compression modes that provide a better compression
20 ratio than the zlib's 'level 9'."
21 HOMEPAGE="https://github.com/ebiggers/libdeflate"
22
23 ################################
24 ## Source from a git repository
25 ################################
26 GIT_REPO="https://github.com/ebiggers/libdeflate"
27 declare -A GIT_DATEHASH_BY_NAME=(
28 # git log --date=iso-strict --format='%cd/%H' -1
29 [1.8]=2021-07-15T09:31:09-05:00/v1.8
30 [1.7]=2020-11-09T19:29:50-08:00/v1.7
31 [1.6]=2020-05-12T19:42:04-07:00/v1.6
32 )
33 REV_HASH="${GIT_DATEHASH_BY_NAME[${VERSION}]#*/}"
34 REV_DATE="${GIT_DATEHASH_BY_NAME[${VERSION}]%/*}"
35 REV_DATE_SHORT="${REV_DATE%%T*}"
36 GIT_BASENAME="${GIT_REPO##*/}"
37 SRC_URI="${GIT_REPO}/archive/${REV_HASH}/${GIT_BASENAME}-${VERSION}.tar.gz"
38 SRC_DIR="${GIT_BASENAME}-${REV_HASH#v}"
39
40 ################################
41 ## ABI for libdeflate
42 ABI=0
43 ################################
44
45 ################################
46 ## Requirements for building
47 ################################
48 BUILD_REQUIRES="\
49 zlib-devel\
50 "
51
52 # Here are packages unnecessary for building but necessary for testing
53 TEST_REQUIRES="\
54 zlib-devel\
55 "
56
57 ################################
58 ## Patch files
59 ################################
60 # Patch filenames are in a default style of 'git format-patch'
61 PATCH_URI=$(\
62 find -maxdepth 1 -type f -name '[0-9][0-9][0-9][0-9]-*.patch' \
63 | sort \
64 )
65 # Additional patches, if any
66 PATCH_URI+="
67 "
68
69 ################################
70 ## Contents of our packages
71 ################################
72 # main package
73 THIS_PN="${NAME}-tools"
74 THIS_VN=${THIS_PN//[-+\.]/_}
75 PKG_NAMES+=" ${THIS_PN}"
76
77 printf -v "${THIS_VN}_CONTENTS" "%s" "\
78 --exclude=*.dll\
79 usr/bin/\
80 usr/share/doc/\
81 "
82 printf -v "${THIS_VN}_REQUIRES" "%s" "\
83 "
84
85 ################################
86 # Runtime libraries
87 THIS_PN="${NAME}${ABI}"
88 THIS_VN=${THIS_PN//[-+\.]/_}
89 PKG_NAMES+=" ${THIS_PN}"
90
91 printf -v "${THIS_VN}_CATEGORY" "%s" "Libs ${CATEGORY}"
92 printf -v "${THIS_VN}_SUMMARY" "%s" "${SUMMARY% *} (runtime)"
93 printf -v "${THIS_VN}_CONTENTS" "%s" "\
94 usr/bin/*.dll\
95 "
96 printf -v "${THIS_VN}_REQUIRES" "%s" "\
97 "
98
99 ################################
100 # Devel
101 THIS_PN="${NAME}-devel"
102 THIS_VN=${THIS_PN//[-+\.]/_}
103 PKG_NAMES+=" ${THIS_PN}"
104
105 printf -v "${THIS_VN}_CATEGORY" "%s" "Devel Libs ${CATEGORY}"
106 printf -v "${THIS_VN}_SUMMARY" "%s" "${SUMMARY% *} (devel)"
107 printf -v "${THIS_VN}_CONTENTS" "%s" "\
108 usr/include/ \
109 usr/lib/lib* \
110 "
111 printf -v "${THIS_VN}_REQUIRES" "%s" "\
112 "
113
114 ################################
115 src_compile() {
116 lndirs
117 cd ${B}
118
119 PREFIX=/usr \
120 USE_SHARED_LIB=1 \
121 cygmake
122 }
123
124 ################################
125 src_install() {
126 cd ${B}
127
128 PREFIX=/usr \
129 USE_SHARED_LIB=1 \
130 cyginstall
131 }
132
133 ################################
134 src_test() {
135 cd ${B}
136
137 PREFIX=/usr \
138 USE_SHARED_LIB=1 \
139 cygtest
140 }
141
142 ################################
This page took 0.038082 seconds and 5 git commands to generate.