File duilder changed (mode: 100755) (index 52405de..9320430) |
... |
... |
function duilder_srpm() |
205 |
205 |
fi |
fi |
206 |
206 |
|
|
207 |
207 |
if [ ! -z "${SRPM_DEST}" ]; then |
if [ ! -z "${SRPM_DEST}" ]; then |
|
208 |
|
if [ -r "${SRPM_DEST}/${PKG}" ]; then |
|
209 |
|
mv "${SRPM_DEST}/${PKG}" "${SRPM_DEST}/${PKG}.old" |
|
210 |
|
fi |
208 |
211 |
echo "[*] Copying [${PKG}] to [${SRPM_DEST}]..." |
echo "[*] Copying [${PKG}] to [${SRPM_DEST}]..." |
209 |
212 |
cp -vp "${PKG}" "${SRPM_DEST}/" |
cp -vp "${PKG}" "${SRPM_DEST}/" |
210 |
213 |
fi |
fi |
|
... |
... |
function duilder_tar() |
274 |
277 |
|
|
275 |
278 |
echo "[*] Generating tarball [${P}.tar.gz]..." |
echo "[*] Generating tarball [${P}.tar.gz]..." |
276 |
279 |
ADD_EXCLUDE="" |
ADD_EXCLUDE="" |
277 |
|
if [ ! -z "${EXCLUDE}" ]; then |
|
|
280 |
|
if [ -r "${EXCLUDE}" ]; then |
278 |
281 |
ADD_EXCLUDE="--exclude-from ${P}/${EXCLUDE}" |
ADD_EXCLUDE="--exclude-from ${P}/${EXCLUDE}" |
279 |
282 |
echo "[*] ADD_EXCLUDE=${ADD_EXCLUDE}" |
echo "[*] ADD_EXCLUDE=${ADD_EXCLUDE}" |
280 |
283 |
fi |
fi |
|
... |
... |
done |
445 |
448 |
# Last fixes |
# Last fixes |
446 |
449 |
VAR_LOG="${VAR}/log" |
VAR_LOG="${VAR}/log" |
447 |
450 |
VAR_RUN="${VAR}/run" |
VAR_RUN="${VAR}/run" |
|
451 |
|
DUILDER_SYSTEMD="${USR}/lib/systemd" |
448 |
452 |
|
|
449 |
|
for i in ETC BIN USR USR_BIN USR_SBIN USR_INCLUDE USR_LIB USR_SHARE USR_SHARE_DOC SBIN VAR VAR_LIB MAN VAR_LOG VAR_RUN; do |
|
|
453 |
|
for i in ETC BIN USR USR_BIN USR_SBIN USR_INCLUDE USR_LIB USR_SHARE USR_SHARE_DOC SBIN VAR VAR_LIB MAN VAR_LOG VAR_RUN DUILDER_SYSTEMD; do |
450 |
454 |
eval value=\$$i |
eval value=\$$i |
451 |
455 |
echo "[*] Var ${i}=${value}" |
echo "[*] Var ${i}=${value}" |
452 |
456 |
done |
done |
|
... |
... |
echo "s#@USR_LIB@#${USR_LIB}#g" >> tmp.sed |
580 |
584 |
echo "s#@USR_SHARE@#${USR_SHARE}#g" >> tmp.sed |
echo "s#@USR_SHARE@#${USR_SHARE}#g" >> tmp.sed |
581 |
585 |
echo "s#@USR_SHARE_DOC@#${USR_SHARE_DOC}#g" >> tmp.sed |
echo "s#@USR_SHARE_DOC@#${USR_SHARE_DOC}#g" >> tmp.sed |
582 |
586 |
echo "s#@MAN@#${MAN}#g" >> tmp.sed |
echo "s#@MAN@#${MAN}#g" >> tmp.sed |
|
587 |
|
echo "s#@DUILDER_SYSTEMD@#${DUILDER_SYSTEMD}#g" >> tmp.sed |
583 |
588 |
# Export stuff |
# Export stuff |
584 |
589 |
echo "s#@EXPORT_PATH@#${EXPORT_PATH}#g" >> tmp.sed |
echo "s#@EXPORT_PATH@#${EXPORT_PATH}#g" >> tmp.sed |
585 |
590 |
# cc_switches |
# cc_switches |
|
... |
... |
if [ -r Makefile.in ]; then |
617 |
622 |
echo "export I_VAR_LOG := \$(DESTDIR)${VAR_LOG}" >> Makefile |
echo "export I_VAR_LOG := \$(DESTDIR)${VAR_LOG}" >> Makefile |
618 |
623 |
echo "export I_VAR_RUN := \$(DESTDIR)${VAR_RUN}" >> Makefile |
echo "export I_VAR_RUN := \$(DESTDIR)${VAR_RUN}" >> Makefile |
619 |
624 |
echo "export I_MAN := \$(DESTDIR)${MAN}" >> Makefile |
echo "export I_MAN := \$(DESTDIR)${MAN}" >> Makefile |
|
625 |
|
echo "export I_DUILDER_SYSTEMD := \$(DESTDIR)${DUILDER_SYSTEMD}" >> Makefile |
620 |
626 |
echo >> Makefile |
echo >> Makefile |
621 |
627 |
echo "# DB stuff" >> Makefile |
echo "# DB stuff" >> Makefile |
622 |
628 |
echo "export DB_SUPPORT := ${DB_SUPPORT}" >> Makefile |
echo "export DB_SUPPORT := ${DB_SUPPORT}" >> Makefile |
|
... |
... |
if [ -r Makefile.in ]; then |
641 |
647 |
echo "dist_git:" >> Makefile |
echo "dist_git:" >> Makefile |
642 |
648 |
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 |
643 |
649 |
echo >> Makefile |
echo >> Makefile |
|
650 |
|
echo "# This is to allow making the tar" >> Makefile |
|
651 |
|
echo "dist_tar:" >> Makefile |
|
652 |
|
echo " @./duilder tar \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${EXCLUDE}\"" >> Makefile |
|
653 |
|
echo >> Makefile |
|
654 |
|
echo "# This is to allow making rpm" >> Makefile |
|
655 |
|
echo "dist_srpm: dist_tar" >> Makefile |
|
656 |
|
echo " @./duilder srpm \"\$(PRJ)\" \"\$(VER)\" \"${EXPORT_PATH}\" \"${BUILD_SRPM}\" \"${SRPM_DEST}\" \"${SRPM_POST_RUN}\"" >> Makefile |
|
657 |
|
echo >> Makefile |
644 |
658 |
echo ".PHONY: dist" >> Makefile |
echo ".PHONY: dist" >> Makefile |
645 |
659 |
echo "dist: clean" >> Makefile |
echo "dist: clean" >> Makefile |
646 |
660 |
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 |
|
... |
... |
fi |
671 |
685 |
echo "[*] Autogenerate files from .in..." |
echo "[*] Autogenerate files from .in..." |
672 |
686 |
for f in ${AUTOGENERATE}; do |
for f in ${AUTOGENERATE}; do |
673 |
687 |
if [ -r "${f}" ]; then |
if [ -r "${f}" ]; then |
674 |
|
dst="${f//.in/}" |
|
|
688 |
|
dst="${f%.in}" |
675 |
689 |
echo " [*] Autogenerate ${dst} from ${f}..." |
echo " [*] Autogenerate ${dst} from ${f}..." |
676 |
690 |
sed -f tmp.sed "${f}" > "${dst}" |
sed -f tmp.sed "${f}" > "${dst}" |
|
691 |
|
# We need to have the same rights (maybe is executable...) |
677 |
692 |
chmod --reference="${f}" "${dst}" |
chmod --reference="${f}" "${dst}" |
678 |
693 |
fi |
fi |
679 |
694 |
done |
done |