actions.py 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  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. pisitools.cflags.sub("-O[s\d]", "-O3")
  29. autotools.configure("--disable-static \
  30. --disable-editline \
  31. --enable-fts3 \
  32. --enable-fts4 \
  33. --enable-fts5 \
  34. --enable-rtree \
  35. --enable-json1 \
  36. --enable-threadsafe")
  37. #shelltools.cd("tea")
  38. #autotools.configure(" \
  39. # --enable-shared \
  40. # --with-tcl='/usr/lib/' \
  41. # --with-tclinclude='/usr/include' \
  42. # --enable-64bit \
  43. # --enable-threads")
  44. def build():
  45. autotools.make("-j1")
  46. #shelltools.cd("tea")
  47. #autotools.make("-j1")
  48. def install():
  49. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  50. #shelltools.cd("%s/sqlite-autoconf-3110000/tea" % get.workDIR())
  51. #autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  52. pisitools.dodoc("README*")
  53. shelltools.cd("%s/sqlite-doc-3220000" % get.workDIR())
  54. shelltools.system("pwd")
  55. pisitools.insinto("/usr/share/doc/sqlite", "../sqlite-doc-3220000/*")
  56. # fix permissions and remove obsolete files; https://bugs.archlinux.org/task/24605
  57. shelltools.system("find %s -type f -perm 755 -exec ls -lha {} \;" % get.installDIR())
  58. shelltools.system("find %s -type f -perm 755 -exec chmod 644 {} \;" % get.installDIR())
  59. shelltools.system("find %s -type f -name '*~' -exec ls -lha {} \;" % get.installDIR())
  60. shelltools.system("find %s -type d -name '*~' -exec ls -lha {} \;" % get.installDIR())
  61. shelltools.system("find %s -name '*~' -exec rm -f {} \;" % get.installDIR())
  62. 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#
  63. shelltools.system("find %s -type d -name '.~*' -exec ls -lha {} \;" % get.installDIR())
  64. shelltools.system("find %s -name '.~*' -exec rm -f {} \;" % get.installDIR())