From e7ae21a61c6c3989a4d82a3454df40cd8a81636a Mon Sep 17 00:00:00 2001 From: mazmazz Date: Tue, 27 Nov 2018 00:45:38 -0500 Subject: [PATCH] Separate asset files from clean step; No more hacky NOCLEAN file --- assets/debian/README.Debian | 11 ++--------- assets/debian/rules | 37 +++++++++++++------------------------ 2 files changed, 15 insertions(+), 33 deletions(-) diff --git a/assets/debian/README.Debian b/assets/debian/README.Debian index 95ac42dda..68c952a4e 100644 --- a/assets/debian/README.Debian +++ b/assets/debian/README.Debian @@ -38,15 +38,8 @@ Use these steps to prepare building a source package for Launchpad: Building the source package is a two-step process: - 1. debuild -T pre-source (this downloads the asset files from srb2.org if necessary) - 2. debuild -S -nc - * Builds the source package for Launchpad, including the asset files - * -nc keeps dpkg from cleaning the assets/ folder, which would remove the files that must - be packaged. - 3. rm ./NOCLEAN - * This is a HACK file to prevent Launchpad from cleaning the asset files before building. - A copy of this file is in the source package, so we don't need it anymore and - we can delete it. If it stays in the assets/ folder, the next clean will be skipped. + 1. debuild -T build (this downloads the asset files from srb2.org if necessary) + 2. debuild -S (builds the source package for Launchpad, including the asset files) Then follow the instructions at to upload to your PPA and have Launchpad build your binary deb packages. diff --git a/assets/debian/rules b/assets/debian/rules index f79659d96..a34a3393f 100755 --- a/assets/debian/rules +++ b/assets/debian/rules @@ -62,13 +62,6 @@ build: fi; \ done -pre-source: build - # HACK HACK HACK: Force Launchpad to not clean by creating this - # file and storing it in the source package. - # We do this so the asset files are not deleted before build - # In Launchpad, we can't download the assets from srb2.org because DNS does not work - > $(RESOURCEDIR)/NOCLEAN - binary-indep: # Generate install folder file echo $(DATADIR) > $(DIR)/debian/$(PACKAGE).install @@ -107,22 +100,18 @@ binary: binary-indep dh_builddeb clean: - if [ ! -f $(RESOURCEDIR)/NOCLEAN ]; then \ - $(RM) $(RESOURCEDIR)/*.wad; \ - $(RM) $(RESOURCEDIR)/*.dta; \ - $(RM) $(RESOURCEDIR)/*.plr; \ - $(RM) $(RESOURCEDIR)/*.wpn; \ - $(RM) $(RESOURCEDIR)/*.srb; \ - $(RM) $(RESOURCEDIR)/*.dll; \ - $(RM) $(RESOURCEDIR)/*.txt; \ - $(RM) $(DIR)/debian/tmp/*; \ - $(RM) $(DIR)/debian/$(PACKAGE).install; \ - $(RM) $(DIR)/debian/files; \ - $(RM) $(DIR)/debian/source/include-binaries; \ - else - echo Clean was ignored because of $(RESOURCEDIR)/NOCLEAN file. Run clean again if you need to!; \ - echo Deleting $(RESOURCEDIR)/NOCLEAN...; \ - $(RM) $(RESOURCEDIR)/NOCLEAN; \ - fi + $(RM) $(DIR)/debian/tmp/*; \ + $(RM) $(DIR)/debian/$(PACKAGE).install; \ + $(RM) $(DIR)/debian/files; \ + +clean-all: clean + $(RM) $(RESOURCEDIR)/*.wad; \ + $(RM) $(RESOURCEDIR)/*.dta; \ + $(RM) $(RESOURCEDIR)/*.plr; \ + $(RM) $(RESOURCEDIR)/*.wpn; \ + $(RM) $(RESOURCEDIR)/*.srb; \ + $(RM) $(RESOURCEDIR)/*.dll; \ + $(RM) $(RESOURCEDIR)/*.txt; \ + $(RM) $(DIR)/debian/source/include-binaries; \ .PHONY: all clean binary binary-arch binary-indep build