Compilation fix
[geanyprj.git] / install / geninst.sh
blob647b62174e34fdcff34f6009a962d5da0b5a4a8e
1 #!/bin/sh
3 # Generate PKGBUILD, spec and ebuild files
6 PKGNAME=`cat ../configure.in | awk '/AC_INIT/ {split($0, a, "["); v = a[2]; sub("\\\], ", "", v);print v;}'`
7 VERSION=`cat ../configure.in | awk '/AC_INIT/ {split($0, a, "["); v = a[3]; sub("\\\], ", "", v);print v;}'`
9 MD5SUM=`md5sum ../${PKGNAME}-${VERSION}.tar.gz | awk '// {print $1}'`
11 if [ -f PKGBUILD.in ]; then
12 awk -v md5=$MD5SUM -v ver=$VERSION '/VERSION/ {gsub("VERSION",ver,$0);} // {print} /^source=/ {printf("md5sums=(%s)\n", md5)}' < PKGBUILD.in > PKGBUILD
15 if [ -f ebuild.in ]; then
16 cp ebuild.in ${PKGNAME}-${VERSION}.ebuild
19 if [ -f setup.nsi.in ]; then
20 cat setup.nsi.in | sed s/VERSION/${VERSION}/g | sed s/PKGNAME/${PKGNAME}/g > ${PKGNAME}.nsi