@@ -44,6 +44,7 @@ openafs_url = "https://www.openafs.org/dl/openafs/1.6.20.1/openafs-1.6.20.1-1.sr
44
44
# zephyr_url = "http://zephyr.1ts.org/files/zephyr-3.0.2.tar.gz"
45
45
46
46
PKG = $(patsubst % .i686,% ,$@ )
47
+ scriptsversion = $(shell git describe --dirty --match root | awk -F- '{print $$2 + 419 "." $$3 ($$4 ? "." $$4 : "") }')
47
48
48
49
.PHONY : minimal-clean
49
50
@@ -105,25 +106,14 @@ patch-specs: install-srpms
105
106
rm -f * .spec.~* ~; \
106
107
for i in $$ list; do \
107
108
patch -bV numbered < $$ i; \
108
- done ; \
109
- list2=` svn ls ${oursrcdir} ` ; \
110
- for i in $$ list2; do \
111
- base=` basename $$ i` ; \
112
- [ -e ${tmp_specs} /$$ base.spec ] || continue ; \
113
- version=` svnversion ${oursrcdir} /$$ i` ; \
114
- version=$$ {version//:/_}; \
115
- echo " $$ i version $$ version" ; \
116
- sed --in-place \
117
- -e " s/SVNVERSION_TO_UPDATE/$$ {version}/" \
118
- ${tmp_specs} /$$ base.spec; \
119
109
done
120
110
121
111
# 1. use the package's Makefile to delete leftover files and run autoconf
122
112
# 2. create a tarball (we want it to contain the autoconf output)
123
113
tarballs : mkdir-tree
124
114
@set -ex; \
125
115
cd ${oursrcdir} ; \
126
- list=` find -mindepth 1 -maxdepth 1 -type d | grep -v " .svn " ` ; \
116
+ list=` find -mindepth 1 -maxdepth 1 -type d` ; \
127
117
for i in $$ list; do \
128
118
pushd $$ i; \
129
119
if [ -x ./mrproper ]; then \
@@ -148,7 +138,7 @@ upstream: mkdir-tree download
148
138
all :
149
139
make $(allsrc )
150
140
151
- $(oursrc ) : rpmbuild_args += --define 'scriptsversion $(shell svnversion ${oursrcdir}/ $* * | tr ':' '_' | sed -e 's/-. * /0.uncommitted/' ) '
141
+ $(oursrc ) : rpmbuild_args += --define 'scriptsversion $(scriptsversion ) '
152
142
153
143
$(filter % .i686,$(oursrc ) ) : % .i686: setup
154
144
PATH=" /usr/kerberos/sbin:/usr/kerberos/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" \
@@ -160,7 +150,7 @@ $(filter-out %.i686,$(oursrc)): %: setup
160
150
rpmbuild ${rpmbuild_args} -bs ${tmp_specs} /${PKG} .spec
161
151
/usr/bin/mock -r scripts-fc20-` uname -m` ${rpmbuild_args} -v --rebuild ` ls -t ${out_srpms} /${PKG} -[0-9]* .src.rpm | head -1`
162
152
163
- $(upstream ) openafs-kernel : rpmbuild_args += --define 'scriptsversion $(shell svnversion ${patches} | tr ':' '_' ) '
153
+ $(upstream ) openafs-kernel : rpmbuild_args += --define 'scriptsversion $(scriptsversion ) '
164
154
165
155
kernel : rpmbuild_args += --define 'buildid .scripts.% {scriptsversion}' --without debug --without doc
166
156
0 commit comments