Finish (?) build of biber prereqs
[git/cygwin-packages/biber.git] / prereqs10 / build.sh
1 #! /bin/bash
2
3 # Run in elevated shell as kbrown-admin.
4 # Copy setup-*.exe to *.exe to avoid prompt.
5
6 SYSARCH=$(uname -m)
7 if [ ${SYSARCH} = i686 ]
8 then
9 GENINI="GEN-ini"
10 DEST_ARCH="x86"
11 else
12 GENINI="GEN-ini64"
13 DEST_ARCH="x86_64"
14 fi
15
16 setup="/c/downloads/cygwin/${DEST_ARCH}.exe"
17
18 GENINI() {
19 mksetupini --arch=${DEST_ARCH} --release=kbrown --inifile=${DEST_ARCH}/setup.ini \
20 --okmissing=required-package --okmissing=curr --releasearea .
21 cd ${DEST_ARCH}
22 xz -c setup.ini > setup.xz
23 chown kbrown setup.ini setup.xz
24 cd ..
25 }
26
27 install() {
28 local command
29 pushd /c/downloads/cygwin/myrepo
30 GENINI
31 popd
32 command="${setup} -q -X -L"
33 for m in ${mods}
34 do
35 command+=" -P ${m}"
36 done
37 echo "Running ${command}"
38 ${command}
39 }
40
41 mods="
42 perl-Business-ISBN
43 perl-Business-ISMN
44 perl-Business-ISSN
45 perl-Class-Accessor
46 perl-Data-Compare
47 perl-Data-Dump
48 perl-Data-Uniqid
49 perl-DateTime-Calendar-Julian
50 perl-DateTime-Format-Builder
51 perl-Encode-JIS2K
52 perl-File-Slurp
53 perl-File-Which
54 perl-LWP-Protocol-https
55 perl-Lingua-Translit
56 perl-List-AllUtils
57 perl-Log-Log4perl
58 perl-Regexp-Common
59 perl-Sort-Key
60 perl-Test-Differences
61 perl-Text-BibTeX
62 perl-Text-CSV
63 perl-Text-CSV_XS
64 perl-Text-Roman
65 perl-Unicode-Collate
66 perl-Unicode-LineBreak
67 perl-XML-LibXML-Simple
68 perl-XML-LibXSLT
69 perl-XML-Writer
70 perl-autovivification
71 "
72
73 rm -f build_failures.txt test_failures.txt
74 touch build_failures.txt test_failures.txt
75 chown kbrown build_failures.txt test_failures.txt
76
77 export cygport_no_error=1
78
79 for m in ${mods}
80 do
81 eval $(grep '^NAME=' ${m}/${m}.cygport)
82 eval $(grep '^VERSION=' ${m}/${m}.cygport)
83 eval $(grep '^RELEASE=' ${m}/${m}.cygport)
84 PVR=${NAME}-${VERSION}-${RELEASE}
85 ARCH=${SYSARCH}
86 eval $(grep '^ARCH=' ${m}/${m}.cygport)
87 if [ ${ARCH} = i686 -o ${SYSARCH} = x86_64 ]
88 then
89 echo "Entering ${m}..."
90 cd ${m} || exit 1
91 echo "Running cygport..."
92 rm -rf ${PVR}.${ARCH}
93 if cygport ${m}.cygport fetch all
94 then
95 cygport ${m}.cygport test || echo $m >> ../test_failures.txt
96 if [ ${ARCH} = noarch ]
97 then
98 dest=/c/downloads/cygwin/myrepo/noarch/release/
99 else
100 dest=/c/downloads/cygwin/myrepo/${DEST_ARCH}/release/
101 fi
102 chown -R kbrown .
103 rm -rf ${dest}/${m}
104 cp -alf ${PVR}.${ARCH}/dist/${m} ${dest}
105 else
106 echo ${m} >> ../build_failures.txt
107 chown -R kbrown .
108 fi
109 echo "Leaving ${m}."
110 cd ..
111 fi
112 done
113 install
114 if [ -n "$(cat *.txt)" ]
115 then
116 echo There were failures.
117 exit 1
118 else
119 exit 0
120 fi
121
This page took 0.037181 seconds and 5 git commands to generate.