#!/bin/tcsh 

if ( $#argv == 0 ) then
  echo "usage: mkinfo <version> <revision>" 
  exit (1)
endif

if ($#argv == 1 ) then
   set revision = 1
else
   set revision = $2
endif

set BINDIR=DARWIN_4_GTK2
set versiondot = $1:s/_/./
set versionu = $1:s/./_/
set filename = acedb_$versiondot-$revision.info       # since 4.9.27 we use versiondot only

echo "Package: acedb" >$filename
echo "Version: $versiondot" >>$filename
echo "Revision: $revision" >>$filename
echo "Source: http://www.acedb.org/Software/Downloads/MONTHLY/ACEDB-source.$versiondot.tar.gz" >>$filename
echo "source-MD5: 8e8e7a432c2c4ea1d0670e2eb421e792" >>$filename     # checksum of tarfile of source code

cat >>$filename << EOF
NoSourceDirectory: true
CompileScript: <<
 make ACEDB_MACHINE=${BINDIR}
<<
InstallScript: <<
install -d %i/bin
install -o root -g wheel bin.${BINDIR}/xace %i/bin
install -o root -g wheel bin.${BINDIR}/tace %i/bin
install -o root -g wheel bin.${BINDIR}/giface %i/bin
install -o root -g wheel bin.${BINDIR}/acediff %i/bin
install -o root -g wheel bin.${BINDIR}/saceserver %i/bin
install -o root -g wheel bin.${BINDIR}/saceclient %i/bin
install -o root -g wheel bin.${BINDIR}/sxaceclient %i/bin
install -o root -g wheel bin.${BINDIR}/xremote %i/bin
install -d %i/share/acedb
mv whelp %i/share/acedb
mv wtools %i/share/acedb
mv wscripts %i/share/acedb
install -d %i/share/acedb/wspec
mv wspec/gtkrc wspec/displays.wrm wspec/cachesize.wrm %i/share/acedb/wspec
mv wspec/database.wrm wspec/psfonts.wrm %i/share/acedb/wspec
chown -R root %i/share/acedb
chgrp -R wheel %i/share/acedb
install -d %i/share/doc
mv wdoc %i/share/doc/acedb
chown -R root %i/share/doc/acedb
chgrp -R wheel %i/share/doc/acedb
<<
Description: Open Source genome database
<<
License: GPL/LGPL
Homepage: http://www.acedb.org/
Maintainer: Rob Clack <rnc@sanger.ac.uk>
Depends: x11, readline, gtk+2
EOF

