epic-ts
authorMichael Wagner <mail@wagnertech.de>
Mon, 11 Feb 2019 22:38:57 +0000 (23:38 +0100)
committerMichael Wagner <mail@wagnertech.de>
Mon, 11 Feb 2019 22:38:57 +0000 (23:38 +0100)
tools/make/mconfigure
tools/make/rules

index a6e919d..4313e46 100755 (executable)
@@ -120,15 +120,21 @@ then
        # delete changelog and control
        rm debian/changelog debian/control || true
        
-       echo "paket=$paket" > debian/rules.pre
+       # mconfigure builds 2 environment files: setenv.sh + rules.pre
+       # setenv.sh is finally appended to rules.pre
+       
+       dpkg-architecture > debian/setenv.sh
+       echo "" > debian/rules.pre
+       
+       echo "paket=$paket" >> debian/setenv.sh
 #      shift
        ARCH=""
        cpp_build=0
 
        set_build
        check_version
-       echo "version=$version" >> debian/rules.pre
-       echo "build=$build" >> debian/rules.pre
+       echo "version=$version" >> debian/setenv.sh
+       echo "build=$build" >> debian/setenv.sh
 
        # get repository name
 #      tmp=$(pwd)
@@ -153,18 +159,20 @@ then
        then
                echo "add_inst_tgt += debian/tmp/DEBIAN/preinst" >> rules.pre
        fi
-        if [ -f $paket.postinst ]
-        then
-                echo "add_inst_tgt += debian/tmp/DEBIAN/postinst" >> rules.pre
-        fi
-        if [ -f $paket.prerm ]
-        then
-                echo "add_inst_tgt += debian/tmp/DEBIAN/prerm" >> rules.pre
-        fi
-        if [ -f $paket.postrm ]
-        then
-                echo "add_inst_tgt += debian/tmp/DEBIAN/postrm" >> rules.pre
-        fi
+       if [ -f $paket.postinst ]
+       then
+                   echo "add_inst_tgt += debian/tmp/DEBIAN/postinst" >> rules.pre
+       fi
+       if [ -f $paket.prerm ]
+       then
+                   echo "add_inst_tgt += debian/tmp/DEBIAN/prerm" >> rules.pre
+       fi
+       if [ -f $paket.postrm ]
+       then
+                   echo "add_inst_tgt += debian/tmp/DEBIAN/postrm" >> rules.pre
+       fi
+       
+       cat setenv.sh >> rules.pre
 
        mkdir -p tmp/DEBIAN
 
@@ -226,7 +234,6 @@ then
        else
                echo "PACK=version" >> debian/rules.pre
        fi
-       cp debian/rules.pre debian/setenv.sh
 fi
 
 if [ $compile -eq 1 -a ! -e debian/$paket.build ]
index 33e72e3..d526237 100755 (executable)
@@ -63,7 +63,7 @@ debian/tmp/DEBIAN/control: debian/control debian/changelog
        dpkg-gencontrol
 
 debian/control: debian/$(paket).control
-       cp debian/$(paket).control debian/control
+       sed "s/_DEB_HOST_ARCH/${DEB_HOST_ARCH}/" debian/$(paket).control >> debian/control
 
 debian/changelog: debian/$(paket).changelog debian/rules.pre
        sed "s/%BUILD%/$(build)/" debian/$(paket).changelog > debian/changelog