mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:56:01 +02:00
make deb: better clean up, from Mazen
git-svn-id: trunk@28506 -
This commit is contained in:
parent
343365de24
commit
09dad5a74c
54
Makefile
54
Makefile
@ -3646,7 +3646,7 @@ DEBDIR=debian
|
||||
endif
|
||||
ifdef LINKISCOPY
|
||||
ifndef LINKTREE
|
||||
LINKTREE:=$(CPPROG) -Rfp
|
||||
LINKTREE:=$(CPPROG) -Rfpl
|
||||
endif
|
||||
else
|
||||
ifndef LINKTREE
|
||||
@ -3658,9 +3658,9 @@ ifneq ($(wildcard ${DEBDIR}/changelog),)
|
||||
DEBPACKAGEVERSION:=$(shell head -n 1 ${DEBDIR}/changelog | awk '{ print $$2 }' | tr -d '[()]')
|
||||
DEBVERSION=$(firstword $(subst -, ,${DEBPACKAGEVERSION}))
|
||||
DEBBUILD=$(lastword $(subst -, ,${DEBPACKAGEVERSION}))
|
||||
DEBSRC=lazarus-${DEBVERSION}
|
||||
DEBSRC=${PACKAGE_NAME}-${DEBVERSION}
|
||||
DEBSRCDIR=${BUILDDIR}/${DEBSRC}
|
||||
DEBSRC_ORIG=lazarus_${DEBVERSION}.orig
|
||||
DEBSRC_ORIG=${PACKAGE_NAME}_${DEBVERSION}.orig
|
||||
BUILDDATE=$(shell /bin/date --utc +%Y%m%d)
|
||||
ifdef MENTORS
|
||||
DEB_BUILDPKG_OPT=-sa
|
||||
@ -3694,46 +3694,46 @@ ifneq ($(DEBVERSION),$(PACKAGE_VERSION))
|
||||
endif
|
||||
debcopy: distclean
|
||||
${DELTREE} ${BUILDDIR}
|
||||
${MKDIRTREE} $(DEBSRCDIR)
|
||||
${MKDIRTREE} ${DEBSRCDIR}
|
||||
ifdef DEBUSESVN
|
||||
$(LINKTREE) Makefile.fpc $(DEBSRCDIR)
|
||||
$(LINKTREE) COPYING.* $(DEBSRCDIR)
|
||||
$(LINKTREE) README.txt $(DEBSRCDIR)
|
||||
$(LINKTREE) components $(DEBSRCDIR)
|
||||
$(LINKTREE) converter $(DEBSRCDIR)
|
||||
$(LINKTREE) debugger $(DEBSRCDIR)
|
||||
$(LINKTREE) designer $(DEBSRCDIR)
|
||||
$(LINKTREE) doceditor $(DEBSRCDIR)
|
||||
$(LINKTREE) docs $(DEBSRCDIR)
|
||||
$(LINKTREE) install $(DEBSRCDIR)
|
||||
$(LINKTREE) examples $(DEBSRCDIR)
|
||||
$(LINKTREE) ide $(DEBSRCDIR)
|
||||
$(LINKTREE) ideintf $(DEBSRCDIR)
|
||||
$(LINKTREE) images $(DEBSRCDIR)
|
||||
$(LINKTREE) languages $(DEBSRCDIR)
|
||||
$(LINKTREE) lazarus.app $(DEBSRCDIR)
|
||||
$(LINKTREE) lcl $(DEBSRCDIR)
|
||||
$(LINKTREE) packager $(DEBSRCDIR)
|
||||
$(LINKTREE) test $(DEBSRCDIR)
|
||||
$(LINKTREE) tools $(DEBSRCDIR)
|
||||
$(LINKTREE) -t $(DEBSRCDIR) \
|
||||
Makefile.fpc COPYING.* README.txt \
|
||||
components \
|
||||
converter \
|
||||
debugger \
|
||||
designer \
|
||||
doceditor \
|
||||
docs \
|
||||
install \
|
||||
examples \
|
||||
ide \
|
||||
ideintf \
|
||||
images \
|
||||
languages \
|
||||
lazarus.app \
|
||||
lcl \
|
||||
packager \
|
||||
test \
|
||||
tools \
|
||||
# add ide/revision.inc
|
||||
echo "const RevisionStr = '${SVNVERSION}';" > $(DEBSRCDIR)/ide/revision.inc
|
||||
else
|
||||
tar -C ${BUILDDIR} -zxf ${DEBSRC_ORIG}.tar.gz ${DEBSRC}
|
||||
${DELTREE} $(DEBSRCDIR)/debian
|
||||
endif
|
||||
debsetup:
|
||||
$(LINKTREE) ${DEBDIR} $(DEBSRCDIR)/debian
|
||||
$(COPYTREE) ${DEBDIR} $(DEBSRCDIR)/debian
|
||||
ifdef SNAPSHOT
|
||||
sed -e "s/${DEBPACKAGEVERSION}/${DEBPACKAGEVERSION}-${BUILDDATE}/" $(DEBSRCDIR)/debian/changelog > $(DEBSRCDIR)/debian/changelog.tmp
|
||||
${MOVE} $(DEBSRCDIR)/debian/changelog.tmp $(DEBSRCDIR)/debian/changelog
|
||||
endif
|
||||
chmod 755 $(DEBSRCDIR)/debian/rules
|
||||
find $(DEBSRCDIR) -name '.svn' | xargs -n1 rm -rf
|
||||
find $(DEBSRCDIR) -name '.svn' | xargs ${DELTREE}
|
||||
debbuild:
|
||||
cd ${DEBSRCDIR} ; dpkg-buildpackage ${DEB_BUILDPKG_OPT}
|
||||
debcheckpolicy:
|
||||
ifdef LINTIAN
|
||||
cd ${DEBSRCDIR} ; lintian -i ../*.changes
|
||||
cd ${DEBSRCDIR} ; lintian -I -i ../*.changes
|
||||
endif
|
||||
debclean:
|
||||
ifndef DEBUSESVN
|
||||
|
53
Makefile.fpc
53
Makefile.fpc
@ -157,7 +157,7 @@ endif
|
||||
# Link Tree
|
||||
ifdef LINKISCOPY
|
||||
ifndef LINKTREE
|
||||
LINKTREE:=$(CPPROG) -Rfp
|
||||
LINKTREE:=$(CPPROG) -Rfpl
|
||||
endif
|
||||
else
|
||||
ifndef LINKTREE
|
||||
@ -172,9 +172,9 @@ ifneq ($(wildcard ${DEBDIR}/changelog),)
|
||||
DEBPACKAGEVERSION:=$(shell head -n 1 ${DEBDIR}/changelog | awk '{ print $$2 }' | tr -d '[()]')
|
||||
DEBVERSION=$(firstword $(subst -, ,${DEBPACKAGEVERSION}))
|
||||
DEBBUILD=$(lastword $(subst -, ,${DEBPACKAGEVERSION}))
|
||||
DEBSRC=lazarus-${DEBVERSION}
|
||||
DEBSRC=${PACKAGE_NAME}-${DEBVERSION}
|
||||
DEBSRCDIR=${BUILDDIR}/${DEBSRC}
|
||||
DEBSRC_ORIG=lazarus_${DEBVERSION}.orig
|
||||
DEBSRC_ORIG=${PACKAGE_NAME}_${DEBVERSION}.orig
|
||||
BUILDDATE=$(shell /bin/date --utc +%Y%m%d)
|
||||
ifdef MENTORS
|
||||
DEB_BUILDPKG_OPT=-sa
|
||||
@ -210,28 +210,27 @@ endif
|
||||
|
||||
debcopy: distclean
|
||||
${DELTREE} ${BUILDDIR}
|
||||
${MKDIRTREE} $(DEBSRCDIR)
|
||||
${MKDIRTREE} ${DEBSRCDIR}
|
||||
ifdef DEBUSESVN
|
||||
$(LINKTREE) Makefile.fpc $(DEBSRCDIR)
|
||||
$(LINKTREE) COPYING.* $(DEBSRCDIR)
|
||||
$(LINKTREE) README.txt $(DEBSRCDIR)
|
||||
$(LINKTREE) components $(DEBSRCDIR)
|
||||
$(LINKTREE) converter $(DEBSRCDIR)
|
||||
$(LINKTREE) debugger $(DEBSRCDIR)
|
||||
$(LINKTREE) designer $(DEBSRCDIR)
|
||||
$(LINKTREE) doceditor $(DEBSRCDIR)
|
||||
$(LINKTREE) docs $(DEBSRCDIR)
|
||||
$(LINKTREE) install $(DEBSRCDIR)
|
||||
$(LINKTREE) examples $(DEBSRCDIR)
|
||||
$(LINKTREE) ide $(DEBSRCDIR)
|
||||
$(LINKTREE) ideintf $(DEBSRCDIR)
|
||||
$(LINKTREE) images $(DEBSRCDIR)
|
||||
$(LINKTREE) languages $(DEBSRCDIR)
|
||||
$(LINKTREE) lazarus.app $(DEBSRCDIR)
|
||||
$(LINKTREE) lcl $(DEBSRCDIR)
|
||||
$(LINKTREE) packager $(DEBSRCDIR)
|
||||
$(LINKTREE) test $(DEBSRCDIR)
|
||||
$(LINKTREE) tools $(DEBSRCDIR)
|
||||
$(LINKTREE) -t $(DEBSRCDIR) \
|
||||
Makefile.fpc COPYING.* README.txt \
|
||||
components \
|
||||
converter \
|
||||
debugger \
|
||||
designer \
|
||||
doceditor \
|
||||
docs \
|
||||
install \
|
||||
examples \
|
||||
ide \
|
||||
ideintf \
|
||||
images \
|
||||
languages \
|
||||
lazarus.app \
|
||||
lcl \
|
||||
packager \
|
||||
test \
|
||||
tools \
|
||||
# add ide/revision.inc
|
||||
echo "const RevisionStr = '${SVNVERSION}';" > $(DEBSRCDIR)/ide/revision.inc
|
||||
else
|
||||
@ -240,20 +239,20 @@ else
|
||||
endif
|
||||
|
||||
debsetup:
|
||||
$(LINKTREE) ${DEBDIR} $(DEBSRCDIR)/debian
|
||||
$(COPYTREE) ${DEBDIR} $(DEBSRCDIR)/debian
|
||||
ifdef SNAPSHOT
|
||||
sed -e "s/${DEBPACKAGEVERSION}/${DEBPACKAGEVERSION}-${BUILDDATE}/" $(DEBSRCDIR)/debian/changelog > $(DEBSRCDIR)/debian/changelog.tmp
|
||||
${MOVE} $(DEBSRCDIR)/debian/changelog.tmp $(DEBSRCDIR)/debian/changelog
|
||||
endif
|
||||
chmod 755 $(DEBSRCDIR)/debian/rules
|
||||
find $(DEBSRCDIR) -name '.svn' | xargs -n1 rm -rf
|
||||
find $(DEBSRCDIR) -name '.svn' | xargs ${DELTREE}
|
||||
|
||||
debbuild:
|
||||
cd ${DEBSRCDIR} ; dpkg-buildpackage ${DEB_BUILDPKG_OPT}
|
||||
|
||||
debcheckpolicy:
|
||||
ifdef LINTIAN
|
||||
cd ${DEBSRCDIR} ; lintian -i ../*.changes
|
||||
cd ${DEBSRCDIR} ; lintian -I -i ../*.changes
|
||||
endif
|
||||
|
||||
debclean:
|
||||
|
Loading…
Reference in New Issue
Block a user