You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.8 KiB

  1. name: gitea
  2. summary: Gitea - A painless self-hosted Git service
  3. description: |
  4. The goal of this project is to make the easiest, fastest, and most painless
  5. way of setting up a self-hosted Git service. With Go, this can be done with
  6. an independent binary distribution across ALL platforms that Go supports,
  7. including Linux, Mac OS X, Windows and ARM.
  8. icon: public/img/gitea-lg.png
  9. confinement: strict
  10. base: core18
  11. adopt-info: gitea
  12. architectures:
  13. - build-on: armhf
  14. - build-on: amd64
  15. - build-on: arm64
  16. environment:
  17. GITEA_CUSTOM: "$SNAP_COMMON"
  18. GITEA_WORK_DIR: "$SNAP_DATA"
  19. apps:
  20. gitea:
  21. command: gitea
  22. plugs: [network, network-bind]
  23. web:
  24. command: gitea web
  25. daemon: simple
  26. plugs: [network, network-bind]
  27. dump:
  28. command: gitea dump
  29. plugs: [home]
  30. version:
  31. command: gitea --version
  32. sqlite:
  33. command: usr/bin/sqlite3
  34. parts:
  35. gitea:
  36. plugin: make
  37. source: .
  38. stage-packages: [ git, sqlite3, openssh-client ]
  39. build-packages: [ git, libpam0g-dev, libsqlite3-dev]
  40. build-snaps: [ go, node/14/stable ]
  41. build-environment:
  42. - LDFLAGS: ""
  43. override-pull: |
  44. snapcraftctl pull
  45. version="$(git describe --always | sed -e 's/-/+git/;y/-/./')"
  46. [ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stable
  47. snapcraftctl set-version "$version"
  48. snapcraftctl set-grade "$grade"
  49. override-build: |
  50. set -x
  51. TAGS="bindata sqlite sqlite_unlock_notify pam cert" make build
  52. install -D gitea "${SNAPCRAFT_PART_INSTALL}/gitea"
  53. cp -r options "${SNAPCRAFT_PART_INSTALL}/"
  54. prime:
  55. - -etc
  56. - -usr/lib/systemd
  57. - -usr/lib/gcc
  58. - -usr/lib/sasl2
  59. - -usr/lib/x86_64-linux-gnu/krb5
  60. - -usr/share/apport
  61. - -usr/share/bash-completion
  62. - -usr/share/git-core/contrib
  63. - -usr/share/man
  64. - -usr/share/upstart
  65. - -var