From: Michael Tremer Date: Sat, 17 Sep 2011 12:55:33 +0000 (+0200) Subject: pakfire: Automatically write version number to pakfire.conf. X-Git-Tag: v2.9-core54~13^2~82 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e40ba2a0dbe5398b32fabaa575879267c27b52f;p=people%2Fms%2Fipfire-2.x.git pakfire: Automatically write version number to pakfire.conf. --- diff --git a/lfs/pakfire b/lfs/pakfire index 8038753b12..11608b36d1 100644 --- a/lfs/pakfire +++ b/lfs/pakfire @@ -30,6 +30,12 @@ THISAPP = pakfire DIR_APP = /opt/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) +ifeq "$(MACHINE_TYPE)" "arm" + PAKFIRE_VERSION = $(VERSION)-$(MACHINE) +else + PAKFIRE_VERSION = $(VERSION) +endif + ############################################################################### # Top-level Rules ############################################################################### @@ -52,7 +58,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) -mkdir -p /opt/pakfire/{db/{meta,lists,rootfiles,installed,core},etc,lib,tmp} \ /var/log/pakfire /var/cache/pakfire cp -fRv $(DIR_SRC)/src/pakfire/* $(DIR_APP) - mv -vf $(DIR_APP)/pakfire.conf $(DIR_APP)/etc/ + sed -e "s/@VERSION@/$(PAKFIRE_VERSION)/g" \ + < $(DIR_APP)/pakfire.conf \ + > $(DIR_APP)/etc/pakfire.conf chown root.root $(DIR_APP) -R chmod 755 $(DIR_APP)/pakfire touch /var/log/pakfire.log diff --git a/src/pakfire/pakfire.conf b/src/pakfire/pakfire.conf index ae174af984..c408a6aaa9 100644 --- a/src/pakfire/pakfire.conf +++ b/src/pakfire/pakfire.conf @@ -21,7 +21,7 @@ package Conf; -$version = "2.9"; +$version = "@VERSION@"; $mainserver = "pakfire.ipfire.org";