bootstrap 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/sh
  2. #
  3. # bootstrap - update generated files
  4. # Copyright (C) 2015-2021 Alex Vong <alexvong1995 AT protonmail DOT com>
  5. #
  6. # This program is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License
  8. # as published by the Free Software Foundation; either version 2
  9. # of the License, or (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software Foundation,
  18. # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. # Process this file with autoconf to produce a configure script.
  20. # use error
  21. set -e
  22. # Obtain DIRNAME by tranforming `foo/bar' to `foo'
  23. # Otherwise, assume it is the current working directory
  24. case "$0" in
  25. */*)
  26. DIRNAME=`expr "x$0" : 'x\(.*\)/[^/]*'`
  27. ;;
  28. *)
  29. DIRNAME='./'
  30. ;;
  31. esac
  32. # change to the directory of this script
  33. cd "$DIRNAME"
  34. # generate .debian/copyright
  35. cp COPYING .debian/copyright
  36. # generate man page
  37. doc/manpage.pl > doc/mlucas.1
  38. # generate Makefile.am
  39. SRCS=`printf '%s ' upstream/src/*`
  40. sed -e "s,[@]SRCS[@],$SRCS,g" < Makefile.am.in > Makefile.am
  41. # invoke autotools
  42. autoreconf -vfi
  43. # patch configure script
  44. printf '%s\n' "$(sed '/#define VERSION/d' configure)" > configure