File debian/copyright.in added (mode: 100644) (index 0000000..ca29685) |
|
1 |
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ |
|
2 |
|
Upstream-Name: @PRJ@ |
|
3 |
|
Source: @HOME_PAGE@ |
|
4 |
|
|
|
5 |
|
Files: * |
|
6 |
|
Copyright: 2015 @MAINTAINER_NAME@ <@MAINTAINER_EMAIL@> |
|
7 |
|
2016 @MAINTAINER_NAME@ <@MAINTAINER_EMAIL@> |
|
8 |
|
License: GPL-3+ |
|
9 |
|
<Put the license of the package here indented by 1 space> |
|
10 |
|
<This follows the format of Description: lines in control file> |
|
11 |
|
. |
|
12 |
|
<Including paragraphs> |
|
13 |
|
|
|
14 |
|
# If you want to use GPL v2 or later for the /debian/* files use |
|
15 |
|
# the following clauses, or change it to suit. Delete these two lines |
|
16 |
|
Files: debian/* |
|
17 |
|
Copyright: 2016 @MAINTAINER_NAME@ <@MAINTAINER_EMAIL@> |
|
18 |
|
License: GPL-2+ |
|
19 |
|
This package is free software; you can redistribute it and/or modify |
|
20 |
|
it under the terms of the GNU General Public License as published by |
|
21 |
|
the Free Software Foundation; either version 2 of the License, or |
|
22 |
|
(at your option) any later version. |
|
23 |
|
. |
|
24 |
|
This package is distributed in the hope that it will be useful, |
|
25 |
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
26 |
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
27 |
|
GNU General Public License for more details. |
|
28 |
|
. |
|
29 |
|
You should have received a copy of the GNU General Public License |
|
30 |
|
along with this program. If not, see <http://www.gnu.org/licenses/> |
|
31 |
|
. |
|
32 |
|
On Debian systems, the complete text of the GNU General |
|
33 |
|
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". |
|
34 |
|
|
|
35 |
|
# Please also look if there are files or directories which have a |
|
36 |
|
# different copyright/license attached and list them here. |
|
37 |
|
# Please avoid to pick license terms that are more restrictive than the |
|
38 |
|
# packaged work, as it may make Debian's contributions unacceptable upstream. |
File duilder changed (mode: 100755) (index 06c624a..083fd22) |
... |
... |
function duilder_docs() |
26 |
26 |
mkdir -p "${EXPORT_PATH}" |
mkdir -p "${EXPORT_PATH}" |
27 |
27 |
fi |
fi |
28 |
28 |
|
|
|
29 |
|
if [ "${BUILD_SDEB}" = "1" ]; then |
|
30 |
|
if [ -d "debian" ]; then |
|
31 |
|
>debian/docs |
|
32 |
|
fi |
|
33 |
|
fi |
|
34 |
|
|
29 |
35 |
echo "[*] Copying docs to [${EXPORT_PATH}]..." |
echo "[*] Copying docs to [${EXPORT_PATH}]..." |
30 |
36 |
for f in README License LICENSE Changelog Changelog-last TODO FAQ INSTALL AUTHORS; do |
for f in README License LICENSE Changelog Changelog-last TODO FAQ INSTALL AUTHORS; do |
31 |
37 |
if [ -r "${f}" ]; then |
if [ -r "${f}" ]; then |
32 |
38 |
cp -vp "${f}" "${EXPORT_PATH}/" |
cp -vp "${f}" "${EXPORT_PATH}/" |
|
39 |
|
if [ "${BUILD_SDEB}" = "1" ]; then |
|
40 |
|
# No need to install the license file |
|
41 |
|
if [ "${f}" = "LICENSE" ]; then |
|
42 |
|
continue |
|
43 |
|
fi |
|
44 |
|
echo "${f}" >> debian/docs |
|
45 |
|
fi |
33 |
46 |
fi |
fi |
34 |
47 |
done |
done |
35 |
48 |
echo |
echo |
|
... |
... |
function duilder_git() |
103 |
116 |
|
|
104 |
117 |
# get the list of tags |
# get the list of tags |
105 |
118 |
number_of_tags=0 |
number_of_tags=0 |
|
119 |
|
git show-ref --tags -d | grep refs/tags/v > duilder.tmp |
106 |
120 |
while read sha1 full_tag; do |
while read sha1 full_tag; do |
107 |
121 |
tag=`echo ${full_tag} | sed -e 's#refs/tags/##' | cut -d'^' -f1` |
tag=`echo ${full_tag} | sed -e 's#refs/tags/##' | cut -d'^' -f1` |
108 |
122 |
tags[${number_of_tags}]=${tag} |
tags[${number_of_tags}]=${tag} |
109 |
123 |
tags_commit[${number_of_tags}]=${sha1} |
tags_commit[${number_of_tags}]=${sha1} |
110 |
124 |
number_of_tags=$[${number_of_tags}+1] |
number_of_tags=$[${number_of_tags}+1] |
111 |
|
done < <(git show-ref --tags -d | grep refs/tags/v) |
|
|
125 |
|
done < duilder.tmp |
|
126 |
|
rm -f duilder.tmp |
112 |
127 |
|
|
113 |
128 |
# get the list of commits, test if is a tag and do the diff |
# get the list of commits, test if is a tag and do the diff |
114 |
129 |
prev="" |
prev="" |
|
... |
... |
function duilder_srpm() |
166 |
181 |
|
|
167 |
182 |
P="${PRJ}-${VER}" |
P="${PRJ}-${VER}" |
168 |
183 |
|
|
|
184 |
|
if [ "${BUILD_SRPM}" != "1" ]; then |
|
185 |
|
exit 0 |
|
186 |
|
fi |
|
187 |
|
|
169 |
188 |
if [ ! -d "${EXPORT_PATH}" ]; then |
if [ ! -d "${EXPORT_PATH}" ]; then |
170 |
189 |
echo "WARN: ${EXPORT_PATH} does not exists. Creating it..." |
echo "WARN: ${EXPORT_PATH} does not exists. Creating it..." |
171 |
190 |
mkdir -p "${EXPORT_PATH}" |
mkdir -p "${EXPORT_PATH}" |
172 |
191 |
fi |
fi |
173 |
192 |
|
|
174 |
|
if [ "${BUILD_SRPM}" != "1" ]; then |
|
175 |
|
exit 0 |
|
176 |
|
fi |
|
177 |
|
|
|
178 |
193 |
echo "[*] Building SRPM..." |
echo "[*] Building SRPM..." |
179 |
194 |
rpmbuild -ts "${P}.tar.gz" |
rpmbuild -ts "${P}.tar.gz" |
180 |
195 |
echo |
echo |
|
... |
... |
function duilder_srpm() |
192 |
207 |
if [ ! -z "${SRPM_DEST}" ]; then |
if [ ! -z "${SRPM_DEST}" ]; then |
193 |
208 |
echo "[*] Copying [${PKG}] to [${SRPM_DEST}]..." |
echo "[*] Copying [${PKG}] to [${SRPM_DEST}]..." |
194 |
209 |
cp -vp "${PKG}" "${SRPM_DEST}/" |
cp -vp "${PKG}" "${SRPM_DEST}/" |
195 |
|
echo |
|
196 |
210 |
fi |
fi |
197 |
211 |
|
|
198 |
212 |
echo "[*] Copying to export dir [${EXPORT_PATH}]..." |
echo "[*] Copying to export dir [${EXPORT_PATH}]..." |
|
... |
... |
function duilder_srpm() |
206 |
220 |
fi |
fi |
207 |
221 |
} |
} |
208 |
222 |
|
|
|
223 |
|
function duilder_sdeb() |
|
224 |
|
{ |
|
225 |
|
PRJ="${1}" |
|
226 |
|
VER="${2}" |
|
227 |
|
EXPORT_PATH="${3}" |
|
228 |
|
BUILD_SDEB="${4}" |
|
229 |
|
SDEB_DEST="${5}" |
|
230 |
|
SDEB_POST_RUN="${6}" |
|
231 |
|
|
|
232 |
|
P="${PRJ}-${VER}" |
|
233 |
|
|
|
234 |
|
if [ "${BUILD_SDEB}" != "1" ]; then |
|
235 |
|
exit 0 |
|
236 |
|
fi |
|
237 |
|
|
|
238 |
|
if [ ! -d "${EXPORT_PATH}" ]; then |
|
239 |
|
echo "WARN: ${EXPORT_PATH} does not exists. Creating it..." |
|
240 |
|
mkdir -p "${EXPORT_PATH}" |
|
241 |
|
fi |
|
242 |
|
|
|
243 |
|
echo "[*] Copying SDEB..." |
|
244 |
|
PKG="${PRJ}_${VER}.orig.tar.gz" |
|
245 |
|
|
|
246 |
|
if [ -n "${SDEB_DEST}" ]; then |
|
247 |
|
cp -vp "${P}.tar.gz" "${SDEB_DEST}/${PKG}" |
|
248 |
|
fi |
|
249 |
|
|
|
250 |
|
echo "[*] Copying to export dir [${DEB_EXPORT_PATH}]..." |
|
251 |
|
mkdir -p "${EXPORT_PATH}" |
|
252 |
|
cp -vp "${P}.tar.gz" "${EXPORT_PATH}/${PKG}" |
|
253 |
|
echo |
|
254 |
|
|
|
255 |
|
if [ -x "${SDEB_POST_RUN}" ]; then |
|
256 |
|
echo "[*] Running post SDEB build script [${SDEB_POST_RUN}]..." |
|
257 |
|
${SDEB_POST_RUN} "${SDEB}/${PKG}" |
|
258 |
|
fi |
|
259 |
|
} |
|
260 |
|
|
209 |
261 |
function duilder_tar() |
function duilder_tar() |
210 |
262 |
{ |
{ |
211 |
263 |
PRJ="${1}" |
PRJ="${1}" |
|
... |
... |
if [ -z "${REV}" ]; then |
282 |
334 |
fi |
fi |
283 |
335 |
|
|
284 |
336 |
# export variables - just in case a script cares |
# export variables - just in case a script cares |
285 |
|
export PRJ VER REV SHORT_DESCRIPTION EXPORT_PATH EXPORT_GIT GIT_PUSH GIT_DEST SRPM_DEST LICENSE |
|
|
337 |
|
export PRJ VER REV SHORT_DESCRIPTION EXPORT_PATH EXPORT_GIT GIT_PUSH GIT_DEST |
|
338 |
|
export SRPM_DEST SDEB_DEST LICENSE MAINTAINER_NAME MAINTAINER_EMAIL |
|
339 |
|
export HOME_PAGE BUILD_SRPM BUILD_SDEB |
286 |
340 |
|
|
287 |
341 |
|
|
288 |
342 |
# Multiplexer |
# Multiplexer |
|
... |
... |
if [ "${1}" = "srpm" ]; then |
310 |
364 |
exit $? |
exit $? |
311 |
365 |
fi |
fi |
312 |
366 |
|
|
|
367 |
|
if [ "${1}" = "sdeb" ]; then |
|
368 |
|
shift |
|
369 |
|
duilder_sdeb "$@" |
|
370 |
|
exit $? |
|
371 |
|
fi |
|
372 |
|
|
313 |
373 |
if [ "${1}" = "final" ]; then |
if [ "${1}" = "final" ]; then |
314 |
374 |
shift |
shift |
315 |
375 |
duilder_final "$@" |
duilder_final "$@" |
|
... |
... |
echo "[*] Duilder builder script" |
322 |
382 |
echo "[*] Copyright Catalin(ux) M. BOIE - catab at embedromix dot ro" |
echo "[*] Copyright Catalin(ux) M. BOIE - catab at embedromix dot ro" |
323 |
383 |
echo "[*] PRJ=${PRJ}, VER=${VER}, REV=${REV}" |
echo "[*] PRJ=${PRJ}, VER=${VER}, REV=${REV}" |
324 |
384 |
echo "[*] System: `uname -a`" |
echo "[*] System: `uname -a`" |
|
385 |
|
echo "[*] Parameters: ${@}" |
325 |
386 |
|
|
326 |
387 |
ETC="/etc" |
ETC="/etc" |
327 |
388 |
BIN="/bin" |
BIN="/bin" |
|
... |
... |
else |
334 |
395 |
USR_LIB="/usr/lib64" |
USR_LIB="/usr/lib64" |
335 |
396 |
fi |
fi |
336 |
397 |
USR_SHARE="/usr/share" |
USR_SHARE="/usr/share" |
337 |
|
USR_SHARE_DOC="/usr/share/doc/${PRJ}-${VER}" |
|
|
398 |
|
USR_SHARE_DOC="/usr/share/doc/${PRJ}" |
338 |
399 |
SBIN="/usr/sbin" |
SBIN="/usr/sbin" |
339 |
400 |
VAR="/var" |
VAR="/var" |
340 |
401 |
VAR_LIB="/var/lib" |
VAR_LIB="/var/lib" |
341 |
402 |
MAN="/usr/share/man" |
MAN="/usr/share/man" |
|
403 |
|
PREFIX="/usr" |
342 |
404 |
|
|
343 |
405 |
while [ "${1}" != "" ]; do |
while [ "${1}" != "" ]; do |
344 |
406 |
xVAR="`echo ${1} | cut -d'=' -f1`" |
xVAR="`echo ${1} | cut -d'=' -f1`" |
345 |
|
xVAL="`echo ${1} | cut -d'=' -f2`" |
|
|
407 |
|
xVAL="`echo ${1} | cut -d'=' -f2 | sed -e "s|\\${prefix}|${PREFIX}|"`" |
|
408 |
|
shift |
346 |
409 |
case ${xVAR} in |
case ${xVAR} in |
347 |
410 |
--sysconfdir) |
--sysconfdir) |
348 |
411 |
ETC="${xVAL}" |
ETC="${xVAL}" |
|
... |
... |
while [ "${1}" != "" ]; do |
371 |
434 |
--mandir) |
--mandir) |
372 |
435 |
MAN="${xVAL}" |
MAN="${xVAL}" |
373 |
436 |
;; |
;; |
|
437 |
|
--prefix) |
|
438 |
|
PREFIX="${xVAL}" |
|
439 |
|
;; |
374 |
440 |
esac |
esac |
375 |
|
shift |
|
376 |
441 |
done |
done |
377 |
442 |
|
|
378 |
443 |
# Last fixes |
# Last fixes |
|
... |
... |
else |
473 |
538 |
echo "s#@NCURSES_FOUND@#1#g" >> tmp.sed |
echo "s#@NCURSES_FOUND@#1#g" >> tmp.sed |
474 |
539 |
fi |
fi |
475 |
540 |
|
|
|
541 |
|
if [ -n "${CC_SWITCHES}" ]; then |
|
542 |
|
_CC_SWITCHES="" |
|
543 |
|
echo "[*] Search for valid compiler flags..." |
|
544 |
|
add="" |
|
545 |
|
for s in ${CC_SWITCHES}; do |
|
546 |
|
echo -n " [*] Testing switch [${s}]..." |
|
547 |
|
set +e |
|
548 |
|
echo "int main(void) { return 0; }" | gcc ${s} -x c -pipe - -o /dev/null 2>/dev/null |
|
549 |
|
E=${?} |
|
550 |
|
set -e |
|
551 |
|
if [ "${E}" != "0" ]; then |
|
552 |
|
echo "not supported" |
|
553 |
|
else |
|
554 |
|
echo "supported" |
|
555 |
|
_CC_SWITCHES="${_CC_SWITCHES}${add}${s}" |
|
556 |
|
add=" " |
|
557 |
|
fi |
|
558 |
|
done |
|
559 |
|
fi |
|
560 |
|
|
476 |
561 |
# generic stuff |
# generic stuff |
477 |
562 |
echo "s#@PRJ@#${PRJ}#g" >> tmp.sed |
echo "s#@PRJ@#${PRJ}#g" >> tmp.sed |
478 |
563 |
echo "s#@VER@#${VER}#g" >> tmp.sed |
echo "s#@VER@#${VER}#g" >> tmp.sed |
|
... |
... |
echo "s#@USR_SHARE_DOC@#${USR_SHARE_DOC}#g" >> tmp.sed |
494 |
579 |
echo "s#@MAN@#${MAN}#g" >> tmp.sed |
echo "s#@MAN@#${MAN}#g" >> tmp.sed |
495 |
580 |
# Export stuff |
# Export stuff |
496 |
581 |
echo "s#@EXPORT_PATH@#${EXPORT_PATH}#g" >> tmp.sed |
echo "s#@EXPORT_PATH@#${EXPORT_PATH}#g" >> tmp.sed |
|
582 |
|
# cc_switches |
|
583 |
|
echo "s#@CC_SWITCHES@#${_CC_SWITCHES}#g" >> tmp.sed |
|
584 |
|
echo "s#@MAINTAINER_NAME@#${MAINTAINER_NAME}#g" >> tmp.sed |
|
585 |
|
echo "s#@MAINTAINER_EMAIL@#${MAINTAINER_EMAIL}#g" >> tmp.sed |
|
586 |
|
echo "s#@SHORT_DESCRIPTION@#${SHORT_DESCRIPTION}#g" >> tmp.sed |
|
587 |
|
echo "s#@HOME_PAGE@#${HOME_PAGE}#g" >> tmp.sed |
497 |
588 |
|
|
498 |
589 |
|
|
499 |
590 |
|
|
|
... |
... |
if [ -r Makefile.in ]; then |
551 |
642 |
echo " @./duilder git \"\$(PRJ)\" \"${GIT_DEST}\" \"${EXPORT_GIT}\" \"${GIT_CHANGELOG}\"" \"${GIT_PUSH}\" >> Makefile |
echo " @./duilder git \"\$(PRJ)\" \"${GIT_DEST}\" \"${EXPORT_GIT}\" \"${GIT_CHANGELOG}\"" \"${GIT_PUSH}\" >> Makefile |
552 |
643 |
echo " @./duilder tar \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${EXCLUDE}\"" >> Makefile |
echo " @./duilder tar \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${EXCLUDE}\"" >> Makefile |
553 |
644 |
echo " @./duilder srpm \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${BUILD_SRPM}\" \"${SRPM_DEST}\" \"${SRPM_POST_RUN}\"" >> Makefile |
echo " @./duilder srpm \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${BUILD_SRPM}\" \"${SRPM_DEST}\" \"${SRPM_POST_RUN}\"" >> Makefile |
|
645 |
|
echo " @./duilder sdeb \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${BUILD_SDEB}\" \"${SDEB_DEST}\" \"${SDEB_POST_RUN}\"" >> Makefile |
554 |
646 |
echo " @./duilder docs \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\"" >> Makefile |
echo " @./duilder docs \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\"" >> Makefile |
555 |
647 |
echo " @./duilder final \"\$(PRJ)\" \"\$(VER)\" \"${RELEASE_SCRIPT}\"" >> Makefile |
echo " @./duilder final \"\$(PRJ)\" \"\$(VER)\" \"${RELEASE_SCRIPT}\"" >> Makefile |
556 |
648 |
echo " @rm -f \"\$(PRJ)-\$(VER).tar.gz\"" >> Makefile |
echo " @rm -f \"\$(PRJ)-\$(VER).tar.gz\"" >> Makefile |
|
... |
... |
if [ ! -z "${CONFIG_H}" ]; then |
567 |
659 |
sed -f tmp.sed ${CONFIG_H}.in > ${CONFIG_H} |
sed -f tmp.sed ${CONFIG_H}.in > ${CONFIG_H} |
568 |
660 |
fi |
fi |
569 |
661 |
|
|
|
662 |
|
if [ "${BUILD_SDEB}" = "1" ]; then |
|
663 |
|
AUTOGENERATE="${AUTOGENERATE} debian/control.in debian/changelog.in" |
|
664 |
|
AUTOGENERATE="${AUTOGENERATE} debian/copyright.in debian/rules.in" |
|
665 |
|
fi |
|
666 |
|
|
|
667 |
|
echo "[*] Autogenerate files from .in..." |
|
668 |
|
for f in ${AUTOGENERATE}; do |
|
669 |
|
if [ -r "${f}" ]; then |
|
670 |
|
dst="${f//.in/}" |
|
671 |
|
echo " [*] Autogenerate ${dst} from ${f}..." |
|
672 |
|
sed -f tmp.sed "${f}" > "${dst}" |
|
673 |
|
chmod --reference="${f}" "${dst}" |
|
674 |
|
fi |
|
675 |
|
done |
|
676 |
|
|
570 |
677 |
rm -f tmp.sed |
rm -f tmp.sed |
571 |
678 |
|
|
572 |
679 |
if [ "`basename ${0}`" = "duilderx" ]; then |
if [ "`basename ${0}`" = "duilderx" ]; then |