actions.py 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import shelltools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. # Use secure delete. Even if the data is deleted with sqlite query, the traces of the deleted data still remains in the file
  11. # but cannot be seen with sqlite query. However, it can be seen by opening the file with a text editor.
  12. # SQLITE_SECURE_DELETE overwrites written data with zeros.
  13. def setup():
  14. pisitools.cflags.add("-DSQLITE_SECURE_DELETE=1",
  15. "-DSQLITE_ENABLE_UNLOCK_NOTIFY=1",
  16. "-DSQLITE_ENABLE_COLUMN_METADATA=1",
  17. "-DSQLITE_DISABLE_DIRSYNC",
  18. "-DSQLITE_ENABLE_FTS3=1",
  19. "-DSQLITE_ENABLE_FTS4",
  20. "-DSQLITE_ENABLE_FTS5",
  21. "-DSQLITE_ENABLE_DBSTAT_VTAB=1",
  22. "-DSQLITE_ENABLE_FTS3_PARENTHESIS",
  23. "-DSQLITE_ENABLE_FTS3_TOKENIZER=1",
  24. "-DSQLITE_ENABLE_STMT_SCANSTATUS",
  25. "-DSQLITE_SOUNDEX",
  26. "-DSQLITE_ENABLE_RTREE",
  27. "-DSQLITE_ENABLE_API_ARMOR",
  28. "-DSQLITE_ENABLE_MATH_FUNCTIONS",
  29. "-Wno-stringop-overflow")
  30. pisitools.cflags.sub("-O[s\d]", "-O3")
  31. autotools.configure("--disable-static \
  32. --disable-editline \
  33. --enable-fts3 \
  34. --enable-fts4 \
  35. --enable-fts5 \
  36. --enable-rtree \
  37. --enable-json1 \
  38. --enable-threadsafe")
  39. # fix unused direct dependency analysis
  40. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  41. #shelltools.cd("tea")
  42. #autotools.configure(" \
  43. # --enable-shared \
  44. # --with-tcl='/usr/lib/' \
  45. # --with-tclinclude='/usr/include' \
  46. # --enable-64bit \
  47. # --enable-threads")
  48. def build():
  49. autotools.make("-j1")
  50. #shelltools.cd("tea")
  51. #autotools.make("-j1")
  52. def install():
  53. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  54. #shelltools.cd("%s/sqlite-autoconf-3110100/tea" % get.workDIR())
  55. #autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  56. pisitools.dodoc("README*")
  57. shelltools.cd("%s/sqlite-doc-3470000" % get.workDIR())
  58. pisitools.insinto("/usr/share/doc/sqlite", "../sqlite-doc-3470000/*")
  59. """
  60. # fix permissions and remove obsolete files; https://bugs.archlinux.org/task/24605
  61. shelltools.system("find %s -type f -perm 755 -exec ls -lha {} \;" % get.installDIR())
  62. shelltools.system("find %s -type f -perm 755 -exec chmod 644 {} \;" % get.installDIR())
  63. shelltools.system("find %s -type f -name '*~' -exec ls -lha {} \;" % get.installDIR())
  64. shelltools.system("find %s -type d -name '*~' -exec ls -lha {} \;" % get.installDIR())
  65. shelltools.system("find %s -name '*~' -exec rm -f {} \;" % get.installDIR())
  66. shelltools.system("find %s -type f -name '.~*' -exec ls -lha {} \;" % get.installDIR())# /build/pkg/sqlite-doc/usr/share/doc/sqlite/images/fileformat/.~lock.indexpage.odg#
  67. shelltools.system("find %s -type d -name '.~*' -exec ls -lha {} \;" % get.installDIR())
  68. shelltools.system("find %s -name '.~*' -exec rm -f {} \;" % get.installDIR())
  69. """