mirror of
https://codeberg.org/librewolf/source.git
synced 2025-01-03 03:10:07 -05:00
improve_targets_merge
This commit is contained in:
commit
430b00ec31
2 changed files with 32 additions and 30 deletions
58
Makefile
58
Makefile
|
@ -7,16 +7,18 @@ release:=$(shell cat ./release)
|
||||||
|
|
||||||
#archive_create=tar cfJ
|
#archive_create=tar cfJ
|
||||||
#ext=.tar.xz
|
#ext=.tar.xz
|
||||||
archive_create=tar cfz
|
archive_create:=tar cfz
|
||||||
ext=.tar.gz
|
ext:=.tar.gz
|
||||||
|
|
||||||
upstream_filename=firefox-$(version).source.tar.xz
|
ff_source_dir:=firefox-$(version)
|
||||||
upstream_dirname=firefox-$(version)
|
ff_source_tarball:=firefox-$(version).source.tar.xz
|
||||||
|
|
||||||
|
lw_source_dir:=librewolf-$(version)-$(release)
|
||||||
|
lw_source_tarball:=librewolf-$(version)-$(release).source$(ext)
|
||||||
|
|
||||||
help :
|
help :
|
||||||
|
|
||||||
@echo "use: $(MAKE) [all] [check] [clean] [veryclean] [build] [package] [run]"
|
@echo "use: $(MAKE) [all] [check] [clean] [veryclean] [bootstrap] [build] [package] [run]"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " all - Make LibreWolf source archive ${version}-${release}."
|
@echo " all - Make LibreWolf source archive ${version}-${release}."
|
||||||
@echo " check - Check if there is a new version of Firefox."
|
@echo " check - Check if there is a new version of Firefox."
|
||||||
|
@ -25,11 +27,11 @@ help :
|
||||||
@echo " clean - Clean everything except the upstream firefox tarball."
|
@echo " clean - Clean everything except the upstream firefox tarball."
|
||||||
@echo " veryclean - Clean everything including the firefox tarball."
|
@echo " veryclean - Clean everything including the firefox tarball."
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " bootstrap - Make librewolf source archive, and bootstrap the build system."
|
@echo " bootstrap - Bootstrap the build environment."
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " build - After a bootstrap, build it."
|
@echo " build - Build LibreWolf (requires bootstraped build environment)."
|
||||||
@echo " package - After a build, package it."
|
@echo " package - Package LibreWolf (requires build)."
|
||||||
@echo " run - After a build, run it."
|
@echo " run - Run LibreWolf (requires build)."
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,28 +49,27 @@ README.md : README.md.in ./version ./release
|
||||||
@rm -f tmp
|
@rm -f tmp
|
||||||
|
|
||||||
|
|
||||||
all : librewolf-$(version)-$(release).source$(ext)
|
all : $(lw_source_tarball)
|
||||||
|
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -rf *~ firefox-$(version) librewolf-$(version) librewolf-$(version)-$(release).source$(ext)
|
rm -rf *~ $(ff_source_dir) $(lw_source_dir) $(lw_source_tarball)
|
||||||
|
|
||||||
veryclean : clean
|
veryclean : clean
|
||||||
rm -f $(upstream_filename)
|
rm -rf $(ff_source_tarball)
|
||||||
|
|
||||||
#
|
#
|
||||||
# The actual build stuff
|
# The actual build stuff
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
$(upstream_filename) :
|
$(ff_source_tarball) :
|
||||||
wget -q "https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz"
|
wget -q "https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz" -O $(ff_source_tarball)
|
||||||
|
|
||||||
librewolf-$(version)-$(release).source$(ext) : $(upstream_filename) ./version ./release scripts/librewolf-patches.py assets/mozconfig assets/patches.txt
|
$(lw_source_dir) : $(ff_source_tarball) ./version ./release scripts/librewolf-patches.py assets/mozconfig assets/patches.txt
|
||||||
rm -rf $(upstream_dirname)
|
rm -rf $(ff_source_dir) $(lw_source_dir)
|
||||||
rm -rf librewolf-$(version)
|
tar xf $(ff_source_tarball)
|
||||||
tar xf $(upstream_filename)
|
mv $(ff_source_dir) $(lw_source_dir)
|
||||||
mv $(upstream_dirname) librewolf-$(version)
|
|
||||||
python3 scripts/librewolf-patches.py $(version) $(release)
|
python3 scripts/librewolf-patches.py $(version) $(release)
|
||||||
rm -f librewolf-$(version)-$(release).source$(ext)
|
rm -f librewolf-$(version)-$(release).source$(ext)
|
||||||
$(archive_create) librewolf-$(version)-$(release).source$(ext) librewolf-$(version)
|
$(archive_create) librewolf-$(version)-$(release).source$(ext) librewolf-$(version)
|
||||||
|
@ -76,22 +77,23 @@ librewolf-$(version)-$(release).source$(ext) : $(upstream_filename) ./version ./
|
||||||
sha256sum librewolf-$(version)-$(release).source$(ext) > librewolf-$(version)-$(release).source$(ext).sha256sum
|
sha256sum librewolf-$(version)-$(release).source$(ext) > librewolf-$(version)-$(release).source$(ext).sha256sum
|
||||||
cat librewolf-$(version)-$(release).source$(ext).sha256sum
|
cat librewolf-$(version)-$(release).source$(ext).sha256sum
|
||||||
|
|
||||||
librewolf-$(version) : librewolf-$(version)-$(release).source$(ext)
|
$(lw_source_tarball) : $(lw_source_dir)
|
||||||
tar xf librewolf-$(version)-$(release).source$(ext)
|
rm -f $(lw_source_tarball)
|
||||||
|
$(archive_create) $(lw_source_tarball) $(lw_source_dir)
|
||||||
|
|
||||||
debs=python3 python3-dev python3-pip
|
debs=python3 python3-dev python3-pip
|
||||||
rpms=python3 python3-devel
|
rpms=python3 python3-devel
|
||||||
bootstrap : librewolf-$(version)
|
bootstrap : $(lw_source_dir)
|
||||||
(sudo apt -y install $(debs); true)
|
(sudo apt -y install $(debs); true)
|
||||||
(sudo rpm -y install $(rpms); true)
|
(sudo rpm -y install $(rpms); true)
|
||||||
(cd librewolf-$(version) && MOZBUILD_STATE_PATH=$$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser)
|
(cd $(lw_source_dir) && MOZBUILD_STATE_PATH=$$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser)
|
||||||
|
|
||||||
build :
|
build : $(lw_source_dir)
|
||||||
(cd librewolf-$(version) && ./mach build)
|
(cd $(lw_source_dir) && ./mach build)
|
||||||
|
|
||||||
package :
|
package :
|
||||||
(cd librewolf-$(version) && ./mach package)
|
(cd $(lw_source_dir) && ./mach package)
|
||||||
|
cp -v $(lw_source_dir)/obj-*/dist/librewolf-$(version)-$(release).en-US.*.tar.bz2 .
|
||||||
|
|
||||||
run :
|
run :
|
||||||
(cd librewolf-$(version) && ./mach run)
|
(cd $(lw_source_dir) && ./mach run)
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ def patch(patchfile):
|
||||||
|
|
||||||
def enter_srcdir(_dir = None):
|
def enter_srcdir(_dir = None):
|
||||||
if _dir == None:
|
if _dir == None:
|
||||||
dir = "librewolf-{}".format(version)
|
dir = "librewolf-{}-{}".format(version, release)
|
||||||
else:
|
else:
|
||||||
dir = _dir
|
dir = _dir
|
||||||
print("cd {}".format(dir))
|
print("cd {}".format(dir))
|
||||||
|
@ -140,7 +140,7 @@ if len(args) != 2:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
version = args[0]
|
version = args[0]
|
||||||
release = args[1]
|
release = args[1]
|
||||||
if not os.path.exists('librewolf-{}'.format(version) + '/configure.py'):
|
if not os.path.exists('librewolf-{}-{}'.format(version, release) + '/configure.py'):
|
||||||
sys.stderr.write('error: folder doesn\'t look like a Firefox folder.')
|
sys.stderr.write('error: folder doesn\'t look like a Firefox folder.')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue