Separate asset files from clean step; No more hacky NOCLEAN file

This commit is contained in:
mazmazz 2018-11-27 00:45:38 -05:00
parent 349308ef01
commit e7ae21a61c
2 changed files with 15 additions and 33 deletions

View file

@ -38,15 +38,8 @@ Use these steps to prepare building a source package for Launchpad:
Building the source package is a two-step process: Building the source package is a two-step process:
1. debuild -T pre-source (this downloads the asset files from srb2.org if necessary) 1. debuild -T build (this downloads the asset files from srb2.org if necessary)
2. debuild -S -nc 2. debuild -S (builds the source package for Launchpad, including the asset files)
* 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.
Then follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload Then follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
to your PPA and have Launchpad build your binary deb packages. to your PPA and have Launchpad build your binary deb packages.

View file

@ -62,13 +62,6 @@ build:
fi; \ fi; \
done 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: binary-indep:
# Generate install folder file # Generate install folder file
echo $(DATADIR) > $(DIR)/debian/$(PACKAGE).install echo $(DATADIR) > $(DIR)/debian/$(PACKAGE).install
@ -107,7 +100,11 @@ binary: binary-indep
dh_builddeb dh_builddeb
clean: clean:
if [ ! -f $(RESOURCEDIR)/NOCLEAN ]; then \ $(RM) $(DIR)/debian/tmp/*; \
$(RM) $(DIR)/debian/$(PACKAGE).install; \
$(RM) $(DIR)/debian/files; \
clean-all: clean
$(RM) $(RESOURCEDIR)/*.wad; \ $(RM) $(RESOURCEDIR)/*.wad; \
$(RM) $(RESOURCEDIR)/*.dta; \ $(RM) $(RESOURCEDIR)/*.dta; \
$(RM) $(RESOURCEDIR)/*.plr; \ $(RM) $(RESOURCEDIR)/*.plr; \
@ -115,14 +112,6 @@ clean:
$(RM) $(RESOURCEDIR)/*.srb; \ $(RM) $(RESOURCEDIR)/*.srb; \
$(RM) $(RESOURCEDIR)/*.dll; \ $(RM) $(RESOURCEDIR)/*.dll; \
$(RM) $(RESOURCEDIR)/*.txt; \ $(RM) $(RESOURCEDIR)/*.txt; \
$(RM) $(DIR)/debian/tmp/*; \
$(RM) $(DIR)/debian/$(PACKAGE).install; \
$(RM) $(DIR)/debian/files; \
$(RM) $(DIR)/debian/source/include-binaries; \ $(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
.PHONY: all clean binary binary-arch binary-indep build .PHONY: all clean binary binary-arch binary-indep build