Kaynağa Gözat

Update own dogfood

Alois Mahdal 7 yıl önce
ebeveyn
işleme
dffd6a0250

+ 2
- 0
utils/mkit/include/deploy.sh Dosyayı Görüntüle

@@ -2,6 +2,8 @@
2 2
 # MKit - simple install helper
3 3
 # See LICENSE file for copyright and license details.
4 4
 
5
+mkit_import ini
6
+
5 7
 _deploy_item() {
6 8
     #
7 9
     # Deploy item and make it look like wanted

+ 2
- 0
utils/mkit/include/mkit.sh Dosyayı Görüntüle

@@ -40,11 +40,13 @@ _valid_targets() {
40 40
     echo debstuff
41 41
     echo dist
42 42
     echo install
43
+    echo release
43 44
     echo release_x
44 45
     echo release_y
45 46
     echo release_z
46 47
     echo rpmstuff
47 48
     echo uninstall
49
+    echo vbump
48 50
     echo vbump_x
49 51
     echo vbump_y
50 52
     echo vbump_z

+ 18
- 2
utils/mkit/include/release.sh Dosyayı Görüntüle

@@ -91,6 +91,7 @@ _release() {
91 91
     #
92 92
     local rlevel=$1     # release level (x, y or z)
93 93
     local newtag        # new tag
94
+    local relsrc        # release source branch (if any)
94 95
     local reldst        # release destination branch (if any)
95 96
 
96 97
     _relck git_present
@@ -107,9 +108,10 @@ _release() {
107 108
     $MKIT_DRY && return
108 109
     git tag -m "$(_release_msg)" "$newtag"
109 110
 
111
+    relsrc=$(ini 1value project:relsrc)
110 112
     reldst=$(ini 1value project:reldst)
111
-    debug_var reldst
112
-    if test -n "$reldst"; then
113
+    debug_var relsrc reldst
114
+    if test -n "$reldst" && test "$reldst" != "$relsrc"; then
113 115
         git branch -f "$reldst" "$newtag"
114 116
     fi
115 117
 }
@@ -169,6 +171,13 @@ _vbump_gitmsg() {
169 171
         '
170 172
 }
171 173
 
174
+release() {
175
+    #
176
+    # Perform release on Z level
177
+    #
178
+    _release z
179
+}
180
+
172 181
 release_x() {
173 182
     #
174 183
     # Perform release on X level
@@ -190,6 +199,13 @@ release_z() {
190 199
     _release z
191 200
 }
192 201
 
202
+vbump() {
203
+    #
204
+    # Perform version bump on Z level
205
+    #
206
+    _vbump z
207
+}
208
+
193 209
 vbump_x() {
194 210
     #
195 211
     # Perform version bump on X level

+ 1
- 1
utils/mkit/include/vars.sh Dosyayı Görüntüle

@@ -57,4 +57,4 @@ MKIT_PROJ_PKGNAME=""
57 57
 #
58 58
 # This MKit version
59 59
 #
60
-MKIT_VERSION=0.0.22+master.gaafa785
60
+MKIT_VERSION=0.0.23+master.g1a2dd96

+ 3
- 3
utils/mkit/make Dosyayı Görüntüle

@@ -24,9 +24,9 @@ MKIT_DIR=${MKIT_DIR:-$(dirname "$0")}
24 24
 init_core
25 25
 
26 26
 case "$1" in
27
-    --version-semver) echo "$MKIT_VERSION"; exit 0 ;;
28
-    --version)        echo "Mkit (Simple Makefile target helper) $MKIT_VERSION"
29
-                      exit 0 ;;
27
+    -V|--version-semver)    echo "$MKIT_VERSION"; exit 0 ;;
28
+    --version)              echo "Mkit (Simple Makefile target helper) $MKIT_VERSION"
29
+                            exit 0 ;;
30 30
 esac
31 31
 
32 32
 mkit_init

+ 3
- 3
utils/mkit/mkit.mk Dosyayı Görüntüle

@@ -27,7 +27,7 @@ install: all
27 27
 	@$(MKIT_DIR)/make install
28 28
 
29 29
 release:
30
-	@$(MKIT_DIR)/make release_z
30
+	@$(MKIT_DIR)/make release
31 31
 
32 32
 release_x:
33 33
 	@$(MKIT_DIR)/make release_x
@@ -42,7 +42,7 @@ uninstall:
42 42
 	@$(MKIT_DIR)/make uninstall
43 43
 
44 44
 vbump:
45
-	@$(MKIT_DIR)/make vbump_z
45
+	@$(MKIT_DIR)/make vbump
46 46
 
47 47
 vbump_x:
48 48
 	@$(MKIT_DIR)/make vbump_x
@@ -53,4 +53,4 @@ vbump_y:
53 53
 vbump_z:
54 54
 	@$(MKIT_DIR)/make vbump_z
55 55
 
56
-.PHONY: all clean dist rpmstuff install uninstall release_x release_y release_z vbump_x vbump_y vbump_z
56
+.PHONY: all clean dist rpmstuff install uninstall release release_x release_y release_z vbump vbump_x vbump_y vbump_z

+ 16
- 6
utils/mkit/stub Dosyayı Görüntüle

@@ -47,7 +47,7 @@ deploy() {
47 47
             echo -n "# $any_name"
48 48
             test -n "$Tagline" && echo -n " - $Tagline"
49 49
             echo
50
-            echo '# See LICENSE.md file for copyright and license details.'
50
+            $MkLicense && echo '# See LICENSE.md file for copyright and license details.'
51 51
             echo ''
52 52
             echo 'MKIT_DIR=utils/mkit'
53 53
             #shellcheck disable=SC2016
@@ -106,7 +106,7 @@ deploy() {
106 106
                 echo "    doc     = [ENV:PREFIX]/share/doc/$PackageName"
107 107
                 echo ""
108 108
                 echo "[tokens]"
109
-                echo "    __BIN_DIR__ = [roots:bin]"
109
+                echo "    __${PackageName^^}_FOO__ = Barr.."
110 110
                 echo ""
111 111
                 echo "[modes]"
112 112
                 echo "    bin     = 755"
@@ -144,7 +144,7 @@ deploy() {
144 144
             echo 'make %{?_smp_mflags}'
145 145
             echo ''
146 146
             echo '%install'
147
-            echo '%make_install'
147
+            echo '%make_install PREFIX=/usr'
148 148
             echo ''
149 149
             echo '%files'
150 150
             echo 'MKIT_STUB_FILELIST'
@@ -197,7 +197,7 @@ deploy() {
197 197
             echo ''
198 198
             echo 'override_dh_auto_install:'
199 199
             echo ''
200
-            echo '	make install DESTDIR=debian/tmp'
200
+            echo '	make install PREFIX=/usr DESTDIR=debian/tmp'
201 201
             echo ''
202 202
             echo 'override_dh_usrlocal:'
203 203
             echo ''
@@ -318,6 +318,17 @@ deploy() {
318 318
             echo "     *  \`MKIT_STUB_FILELIST\` - List of full paths to"
319 319
             echo "        your files after installation."
320 320
             echo ""
321
+            echo "        Note that in case of debian/package.install files,"
322
+            echo "        PREFIX based paths (eg. /usr/bin) in this file should"
323
+            echo "        should be as if PREFIX was /usr/local, despite PREFIX"
324
+            echo "        being set to /usr in debian/rules.  (Debian's script"
325
+            echo "        dh_usrlocal will take care of that.)"
326
+            echo ""
327
+            echo "        In case of Fedora-based distro, you should make use"
328
+            echo "        of RPM macros:"
329
+            echo ""
330
+            echo "            https://fedoraproject.org/wiki/Packaging:RPMMacros"
331
+            echo ""
321 332
             echo "    Refer to these documents for further details:"
322 333
             echo ""
323 334
             echo "        http://rpm-guide.readthedocs.io/"
@@ -545,7 +556,6 @@ deploy_packaging() {
545 556
     deploy packaging/debian/rules
546 557
     deploy packaging/debian/source/format
547 558
     deploy packaging/debian/"$PackageName".install
548
-    deploy packaging/template.spec
549 559
 }
550 560
 
551 561
 init_from_existing() {
@@ -660,7 +670,7 @@ main() {
660 670
         *)        usage ;;
661 671
     esac
662 672
     updating && init_from_existing
663
-    if test -n $License; then
673
+    if test -n "$License"; then
664 674
         known_licenses | grep -qxF "$License" \
665 675
          || die "unknown license (use -L to get list): $License"
666 676
         MkLicense=true