From 1e40ba2a0dbe5398b32fabaa575879267c27b52f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 17 Sep 2011 14:55:33 +0200 Subject: [PATCH] pakfire: Automatically write version number to pakfire.conf. --- lfs/pakfire | 10 +++++++++- src/pakfire/pakfire.conf | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) 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"; -- 2.39.5