catalinux / Conn (public) (License: LGPLv2) (since 2016-03-01) (hash sha1)
Net library for easy building ipv4/ipv6 network daemons/clients
List of commits:
Subject Hash Author Date (UTC)
Updated duilder. a20257fddc85103b43978c64d9cd4a5d4c1451ea Catalin(ux) M. BOIE 2008-07-04 09:14:18
Added SRPM_POST_RUN duilder config variable. f7c007d745d147f285ad8bc0a9bdfea3a7d832c0 Catalin(ux) M. BOIE 2008-07-04 09:13:47
Changed my e-mail address and URL. 9353a5fd0cad934232e41b23ee10872f33df2da1 Catalin(ux) M. BOIE 2008-07-04 09:13:10
Updated .gitignore. c40b1c4bf37a2b43804e39444571110eb79be466 Catalin(ux) M. BOIE 2008-07-04 09:07:56
Added .gitignore for examples directory. fc20d411e784066c30e3abe3d77989168fca1ee9 Catalin(ux) M. BOIE 2008-07-04 09:07:33
Added Conn_get_line. 5916ac4c9544d242a21ac50178efae893dff4806 Catalin(ux) M. BOIE 2008-07-04 08:59:27
Prepared to use duilder (my custom builder). 058d181795e64c0d1a82d587e7b1d858b7af87b2 Catalin(ux) M. BOIE 2008-03-21 13:37:19
Populated .gitignore file. e549ac0271ac654f039d5a04a0708d25030b0ed6 Catalin(ux) M. BOIE 2008-03-21 13:12:49
Replaced umbrella with embedromix. 6b6671cce7f0a2c98ac27705ad638c4e1bc52213 Catalin(ux) M. BOIE 2007-10-03 21:56:40
Incremented revision. e79bace79bb15f59133841a144ef1ff04e516cd5 Catalin(ux) M. BOIE 2007-10-03 21:55:25
Changed changelog. 00c9dba4e97d924299fd992ff8f4e20fce5c770e Catalin(ux) M. BOIE 2007-10-03 20:43:21
First import. 5ad0e7b8aa527aaebab52c53b45c36257fce5d0a Catalin(ux) M. BOIE 2007-10-03 20:20:26
Commit a20257fddc85103b43978c64d9cd4a5d4c1451ea - Updated duilder.
Author: Catalin(ux) M. BOIE
Author date (UTC): 2008-07-04 09:14
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2008-07-04 09:14
Parent(s): f7c007d745d147f285ad8bc0a9bdfea3a7d832c0
Signer:
Signing key:
Signing status: N
Tree: 1f2c4e194c0f304098e9873bd7b3a5d99e304642
File Lines added Lines deleted
duilder 54 17
File duilder changed (mode: 100755) (index 4366629..3ae028d)
... ... function duilder_docs()
9 9 EXPORT_PATH="${3}" EXPORT_PATH="${3}"
10 10
11 11 echo "Copying docs to [${EXPORT_PATH}]..." echo "Copying docs to [${EXPORT_PATH}]..."
12 for f in README License LICENCE Changelog TODO FAQ; do
12 for f in README License LICENSE Changelog TODO FAQ INSTALL; do
13 13 if [ -r "${f}" ]; then if [ -r "${f}" ]; then
14 14 cp -vp "${f}" "${EXPORT_PATH}/" cp -vp "${f}" "${EXPORT_PATH}/"
15 15 fi fi
 
... ... function duilder_git()
34 34 exit 0 exit 0
35 35 fi fi
36 36
37 if [ ! -x /usr/bin/git ]; then
38 echo "Warning: Git not found!"
39 exit 0
40 fi
41
37 42 if [ ! -d .git ]; then if [ ! -d .git ]; then
43 echo "Warning: I cannot find .git directory!"
38 44 exit 0 exit 0
39 45 fi fi
40 46
 
... ... function duilder_git()
45 51 echo "Generate GIT tree for HTTP transport..." echo "Generate GIT tree for HTTP transport..."
46 52 if [ ! -d "${GIT_DEST}/${PRJ}.git" ]; then if [ ! -d "${GIT_DEST}/${PRJ}.git" ]; then
47 53 git-clone --bare . "${GIT_DEST}/${PRJ}.git" git-clone --bare . "${GIT_DEST}/${PRJ}.git"
54
55 # Activate post-update hook
48 56 chmod a+x "${GIT_DEST}/${PRJ}.git/hooks/post-update" chmod a+x "${GIT_DEST}/${PRJ}.git/hooks/post-update"
57
58 # add project name and description
49 59 echo "${PRJ}" > "${GIT_DEST}/${PRJ}.git/description" echo "${PRJ}" > "${GIT_DEST}/${PRJ}.git/description"
60
50 61 # allow export by git daemon? # allow export by git daemon?
51 62 #touch "${GIT_DEST}/${PRJ}.git/git-daemon-export-ok #touch "${GIT_DEST}/${PRJ}.git/git-daemon-export-ok
52 63 else else
 
... ... function duilder_srpm()
85 96 EXPORT_PATH="${3}" EXPORT_PATH="${3}"
86 97 BUILD_SRPM="${4}" BUILD_SRPM="${4}"
87 98 SRPM_DEST="${5}" SRPM_DEST="${5}"
99 SRPM_POST_RUN="${6}"
88 100
89 101 P="${PRJ}-${VER}" P="${PRJ}-${VER}"
90 102
 
... ... function duilder_srpm()
95 107 echo "Building SRPM..." echo "Building SRPM..."
96 108 rpmbuild -ts "${P}.tar.gz" rpmbuild -ts "${P}.tar.gz"
97 109
110 PKG="/usr/src/redhat/SRPMS/${P}-1.src.rpm"
111
98 112 if [ ! -z "${SRPM_DEST}" ]; then if [ ! -z "${SRPM_DEST}" ]; then
99 113 echo "Copying to [${SRPM_DEST}]..." echo "Copying to [${SRPM_DEST}]..."
100 cp -vp /usr/src/redhat/SRPMS/${P}* "${SRPM_DEST}/"
114 cp -vp "${PKG}" "${SRPM_DEST}/"
101 115 fi fi
102 116
103 117 echo "Copying to export dir [${EXPORT_PATH}]..." echo "Copying to export dir [${EXPORT_PATH}]..."
104 118 mkdir -p "${EXPORT_PATH}" mkdir -p "${EXPORT_PATH}"
105 cp -vp /usr/src/redhat/SRPMS/${P}* "${EXPORT_PATH}/"
119 cp -vp "${PKG}" "${EXPORT_PATH}/"
120
121 if [ -x "${SRPM_POST_RUN}" ]; then
122 echo "Running post SRPM build script [${SRPM_POST_RUN}]..."
123 ${SRPM_POST_RUN} "${PKG}"
124 fi
106 125 } }
107 126
108 127 function duilder_tar() function duilder_tar()
 
... ... function duilder_tar()
123 142 (cd .. && rm -f "${P}" && ln -s "${PRJ}" "${P}") (cd .. && rm -f "${P}" && ln -s "${PRJ}" "${P}")
124 143 tar czhf "${P}.tar.gz" \ tar czhf "${P}.tar.gz" \
125 144 --exclude '.git' \ --exclude '.git' \
145 --exclude ./Makefile \
126 146 --exclude "${P}.tar.gz" \ --exclude "${P}.tar.gz" \
127 147 ${ADD} \ ${ADD} \
128 148 -C .. "${P}" -C .. "${P}"
 
... ... function duilder_tar()
137 157
138 158 #################################################################### ####################################################################
139 159
140 ###### Multiplexer
160 # Multiplexer
141 161 if [ "${1}" = "docs" ]; then if [ "${1}" = "docs" ]; then
142 162 shift shift
143 163 duilder_docs "$@" duilder_docs "$@"
 
... ... while [ "${1}" != "" ]; do
227 247 shift shift
228 248 done done
229 249
250 # Truncate future sed file
251 > tmp.sed
230 252
231 253 DB_SUPPORT=0 DB_SUPPORT=0
232 254
233 255 echo -n "Searching for PostgreSQL..." echo -n "Searching for PostgreSQL..."
234 PG_FOUND=0
235 PG_VERSION=""
236 256 set +e set +e
237 257 PG_VERSION="`pg_config --version 2>/dev/null`" PG_VERSION="`pg_config --version 2>/dev/null`"
238 258 set -e set -e
239 259 if [ -z "${PG_VERSION}" ]; then if [ -z "${PG_VERSION}" ]; then
240 echo " not found!"
260 echo " not found."
261 PG_FOUND=0
241 262 else else
242 echo " found version ${PG_VERSION}!"
263 echo " found version ${PG_VERSION}."
243 264 PG_FOUND=1 PG_FOUND=1
244 265 PG_INC="${DB_INC} -I`pg_config --includedir`" PG_INC="${DB_INC} -I`pg_config --includedir`"
245 266 PG_LIB="${DB_INC} -L`pg_config --libdir` -lpq" PG_LIB="${DB_INC} -L`pg_config --libdir` -lpq"
267
268 echo "s#@PG_VERSION@#${PG_VERSION}#g" >> tmp.sed
269 echo "s#@PG_INC@#${PG_INC}#g" >> tmp.sed
270 echo "s#@PG_LIB@#${PG_LIB}#g" >> tmp.sed
271
246 272 DB_SUPPORT=1 DB_SUPPORT=1
273 echo "s#@DB_SUPPORT@#${DB_SUPPORT}#g" >> tmp.sed
274 fi
275 echo "s#@PG_FOUND@#${PG_FOUND}#g" >> tmp.sed
276
277
278 echo -n "Searching for epoll..."
279 set +e
280 echo -e "#include <sys/epoll.h> \n int main(void) { return epoll_create(64); }" | gcc -x c -pipe - -o /dev/null 2>/dev/null
281 E="${?}"
282 set -e
283 if [ "${E}" != "0" ]; then
284 echo " not found."
285 echo "s#@EPOLL_FOUND@#0#g" >> tmp.sed
286 else
287 echo " found."
288 echo "s#@EPOLL_FOUND@#1#g" >> tmp.sed
247 289 fi fi
248 290
249 291 # generic stuff # generic stuff
250 292 echo "s#@PRJ@#${PRJ}#g" >> tmp.sed echo "s#@PRJ@#${PRJ}#g" >> tmp.sed
251 293 echo "s#@VER@#${VER}#g" >> tmp.sed echo "s#@VER@#${VER}#g" >> tmp.sed
252 294 echo "s#@REV@#${REV}#g" >> tmp.sed echo "s#@REV@#${REV}#g" >> tmp.sed
295 echo "s#@DESCRIPTION@#${DESCRIPTION}#g" >> tmp.sed
296
253 297 echo "s#@ETC@#${ETC}#g" >> tmp.sed echo "s#@ETC@#${ETC}#g" >> tmp.sed
254 298 echo "s#@BIN@#${BIN}#g" >> tmp.sed echo "s#@BIN@#${BIN}#g" >> tmp.sed
255 299 echo "s#@USR_BIN@#${USR_BIN}#g" >> tmp.sed echo "s#@USR_BIN@#${USR_BIN}#g" >> tmp.sed
 
... ... echo "s#@USR_INCLUDE@#${USR_INCLUDE}#g" >> tmp.sed
260 304 echo "s#@USR_INC@#${USR_INCLUDE}#g" >> tmp.sed echo "s#@USR_INC@#${USR_INCLUDE}#g" >> tmp.sed
261 305 echo "s#@USR_LIB@#${USR_LIB}#g" >> tmp.sed echo "s#@USR_LIB@#${USR_LIB}#g" >> tmp.sed
262 306 echo "s#@USR_SHARE_DOC@#${USR_SHARE_DOC}#g" >> tmp.sed echo "s#@USR_SHARE_DOC@#${USR_SHARE_DOC}#g" >> tmp.sed
263 # PG stuff
264 echo "s#@PG_VERSION@#${PG_VERSION}#g" >> tmp.sed
265 echo "s#@PG_FOUND@#${PG_FOUND}#g" >> tmp.sed
266 echo "s#@PG_INC@#${PG_INC}#g" >> tmp.sed
267 echo "s#@PG_LIB@#${PG_LIB}#g" >> tmp.sed
268 # DB stuff
269 echo "s#@DB_SUPPORT@#${DB_SUPPORT}#g" >> tmp.sed
270 307 # Export stuff # Export stuff
271 308 echo "s#@EXPORT_PATH@#${EXPORT_PATH}#g" >> tmp.sed echo "s#@EXPORT_PATH@#${EXPORT_PATH}#g" >> tmp.sed
272 309
 
... ... if [ -r Makefile.in ]; then
314 351 echo >> Makefile echo >> Makefile
315 352 echo ".PHONY: dist" >> Makefile echo ".PHONY: dist" >> Makefile
316 353 echo "dist: clean" >> Makefile echo "dist: clean" >> Makefile
317 echo " @./duilder tar \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${EXCLUDE}\"" >> Makefile
318 echo " @./duilder srpm \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${BUILD_SRPM}\" \"${SRPM_DEST}\"" >> Makefile
319 354 echo " @./duilder git \"\$(PRJ)\" \"${GIT_DEST}\" \"${EXPORT_GIT}\" \"${EXPORT_PATH}\" \"${GIT_CHANGELOG}\"" >> Makefile echo " @./duilder git \"\$(PRJ)\" \"${GIT_DEST}\" \"${EXPORT_GIT}\" \"${EXPORT_PATH}\" \"${GIT_CHANGELOG}\"" >> Makefile
355 echo " @./duilder tar \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${EXCLUDE}\"" >> Makefile
356 echo " @./duilder srpm \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${BUILD_SRPM}\" \"${SRPM_DEST}\" \"${SRPM_POST_RUN}\"" >> Makefile
320 357 echo " @./duilder docs \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\"" >> Makefile echo " @./duilder docs \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\"" >> Makefile
321 358 echo " @rm -f \"\$(PRJ)-\$(VER).tar.gz\"" >> Makefile echo " @rm -f \"\$(PRJ)-\$(VER).tar.gz\"" >> Makefile
322 359 echo >> Makefile echo >> Makefile
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/Conn

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/Conn

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/Conn

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main