Commit eb55dc8f authored by Mike Gabriel's avatar Mike Gabriel

Drop not-used-anymore NX source tree clean-up code. Source tree has been cleaned up natively.

parent 939492d8
......@@ -139,39 +139,10 @@ mv -v debian/changelog doc/changelog
test -f Makefile || test -f debian/Makefile.nx-libs && cp -v debian/Makefile.nx-libs Makefile
test -f replace.sh || test -f debian/Makefile.replace.sh && cp -v debian/Makefile.replace.sh replace.sh
#### stuff we do not needed
UNUSED_FOLDERS=`cat debian/CODE-REDUCTION_CLEANUP-UNUSED`
CLEANUP_FOLDERS=`cat debian/CODE-REDUCTION_CLEANUP-BRUTAL`
UNNEEDED_BACKUPS=`cat debian/CODE-REDUCTION_CLEANUP-BACKUPFILES`
PRESERVE_SYMLINKED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-SYMLINKED`
PRESERVE_INCLUDED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-INCLUDED`
PRESERVE_NEEDED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-NEEDED`
# remove folders that we do not want to roll into the tarball
rm -Rf ".pc/"
rm -Rf "debian/"
mkdir -p .preserve/
for path in ${PRESERVE_SYMLINKED_FILES} ${PRESERVE_INCLUDED_FILES} ${PRESERVE_NEEDED_FILES}; do
if [ ! -d $path ]; then
path_dirname=$(dirname "$path")
else
path_dirname="$path"
fi
mkdir -vp ".preserve/$path_dirname"
cp -av "$path" ".preserve/$path"
done
for path in ${UNUSED_FOLDERS} ${CLEANUP_FOLDERS} ${UNNEEDED_BACKUPS}; do
rm -R "$path"
done
# re-create the to-be-preserved files
cp -a .preserve/* ./
rm -Rf .preserve/
# remove files, that we do not want in the tarballs (build cruft)
rm -Rf nx*/configure nx*/autom4te.cache*
......
......@@ -13,14 +13,6 @@ export INCLUDEDIR = "/usr/include/$(shell dpkg-architecture -qDEB_BUILD_MULTIARC
%:
CONFIGURE="./configure --with-symbols --prefix=/usr --libdir=$(LIBDIR) --includedir=$(INCLUDEDIR)" dh $@ --with quilt
# before build, we will remove unused code / bundled libraries (keep this in sync with roll-tarball.sh)
UNUSED_FOLDERS = "debian/CODE-REDUCTION_CLEANUP-UNUSED"
CLEANUP_FOLDERS = "debian/CODE-REDUCTION_CLEANUP-BRUTAL"
UNNEEDED_BACKUPS = "debian/CODE-REDUCTION_CLEANUP-BACKUPFILES"
PRESERVE_SYMLINKED_FILES = "debian/CODE-REDUCTION_PRESERVE-SYMLINKED"
PRESERVE_NEEDED_FILES = "debian/CODE-REDUCTION_PRESERVE-NEEDED"
PRESERVE_INCLUDED_FILES = "debian/CODE-REDUCTION_PRESERVE-INCLUDED"
override_dh_auto_clean:
rm -Rf nx-X11/.build-exports
dh_auto_clean
......@@ -121,24 +113,6 @@ override_dh_auto_build:
# let's prep the libnx-xinerama1.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable
sed debian/libnx-xinerama1.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/libnx-xinerama1.postinst
# make a copy of code to be preserved for build
mkdir -p .preserve
for path in `cat $(PRESERVE_SYMLINKED_FILES)` `cat $(PRESERVE_NEEDED_FILES)` `cat $(PRESERVE_INCLUDED_FILES)`; do \
if echo $$path | grep -E "^#.*"; then continue; fi; \
test -d $$path && mkdir -p .preserve/$$path || mkdir -p .preserve/$$(dirname $$path); \
cp -av $$path .preserve/$$path; \
done
# remove unused code / bundled libraries (see at the top of the debian/rules file)
# for the exact list of files and folders
rm -Rf `cat $(UNUSED_FOLDERS)`
rm -Rf `cat $(CLEANUP_FOLDERS)`
rm -Rf `cat $(UNNEEDED_BACKUPS)`
# copy to-be-preserved files back into code tree
cp -av .preserve/* .
rm -Rf .preserve/
LOCAL_LDFLAGS=$(LDFLAGS) SHLIBGLOBALSFLAGS=$(LDFLAGS) SHLIBDIR=$(LIBDIR) PREFIX=/usr dh_auto_build --parallel
override_dh_strip:
......
......@@ -672,32 +672,6 @@ cp -v debian/x2goagent.keyboard etc/x2goagent.keyboard
cp -v debian/VERSION VERSION.x2goagent
cp -v debian/VERSION nxcomp/VERSION
### remove bundled libraries (also taken from roll-tarball.sh)
UNUSED_FOLDERS=`cat debian/CODE-REDUCTION_CLEANUP-UNUSED`
CLEANUP_FOLDERS=`cat debian/CODE-REDUCTION_CLEANUP-BRUTAL`
UNNEEDED_BACKUPS=`cat debian/CODE-REDUCTION_CLEANUP-BACKUPFILES`
PRESERVE_SYMLINKED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-SYMLINKED`
PRESERVE_INCLUDED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-INCLUDED`
PRESERVE_NEEDED_FILES=`cat debian/CODE-REDUCTION_PRESERVE-NEEDED`
mkdir -p .preserve/
for path in ${PRESERVE_SYMLINKED_FILES} ${PRESERVE_INCLUDED_FILES} ${PRESERVE_NEEDED_FILES}; do
if [ ! -d $path ]; then
path_dirname=$(dirname "$path")
else
path_dirname="$path"
fi
mkdir -vp ".preserve/$path_dirname"
cp -av "$path" ".preserve/$path"
done
for path in ${UNUSED_FOLDERS} ${CLEANUP_FOLDERS} ${UNNEEDED_BACKUPS}; do
rm -R "$path"
done
# re-create the to-be-preserved files
cp -a .preserve/* ./
rm -Rf .preserve/
### end of remove bundle libraries
# remove build cruft that is in Git (also taken from roll-tarball.sh)
rm -Rf nx*/configure nx*/autom4te.cache*
# Install into /usr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment