Browse Source

gnunet-secushare: auto-configure database backend

Import uci-defaults scripts to auto-set psycstore database backend.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
lilik-openwrt-22.03
Daniel Golle 6 years ago
parent
commit
1c658e5f30
4 changed files with 15 additions and 1 deletions
  1. +7
    -1
      net/gnunet-secushare/Makefile
  2. +8
    -0
      net/gnunet-secushare/files/gnunet-secushare-mysql.defaults
  3. +0
    -0
      net/gnunet-secushare/files/gnunet-secushare-pgsql.defaults
  4. +0
    -0
      net/gnunet-secushare/files/gnunet-secushare-sqlite.defaults

+ 7
- 1
net/gnunet-secushare/Makefile View File

@ -5,7 +5,7 @@ PKG_NAME:=gnunet-secushare
PKG_SOURCE_VERSION:=81939cb93670efcee8e99884d10d2676b02edba9 PKG_SOURCE_VERSION:=81939cb93670efcee8e99884d10d2676b02edba9
PKG_SOURCE_DATE:=20190228 PKG_SOURCE_DATE:=20190228
PKG_MIRROR_HASH:=64a0fb7ad6a515559360de71df85dde152f55a60585668f15114bc1f55cf2742 PKG_MIRROR_HASH:=64a0fb7ad6a515559360de71df85dde152f55a60585668f15114bc1f55cf2742
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://gnunet.org/git/gnunet-secushare.git PKG_SOURCE_URL:=https://gnunet.org/git/gnunet-secushare.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_LICENSE:=GPL-3.0 PKG_LICENSE:=GPL-3.0
@ -83,16 +83,22 @@ endef
define Package/gnunet-secushare-mysql/install define Package/gnunet-secushare-mysql/install
$(INSTALL_DIR) $(1)/usr/lib/gnunet $(INSTALL_DIR) $(1)/usr/lib/gnunet
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_mysql.so* $(1)/usr/lib/gnunet/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_mysql.so* $(1)/usr/lib/gnunet/
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/gnunet-secushare-mysql.defaults $(1)/etc/uci-defaults/gnunet-secushare-mysql
endef endef
define Package/gnunet-secushare-pgsql/install define Package/gnunet-secushare-pgsql/install
$(INSTALL_DIR) $(1)/usr/lib/gnunet $(INSTALL_DIR) $(1)/usr/lib/gnunet
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_postgres.so* $(1)/usr/lib/gnunet/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_postgres.so* $(1)/usr/lib/gnunet/
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/gnunet-secushare-pgsql.defaults $(1)/etc/uci-defaults/gnunet-secushare-pgsql
endef endef
define Package/gnunet-secushare-sqlite/install define Package/gnunet-secushare-sqlite/install
$(INSTALL_DIR) $(1)/usr/lib/gnunet $(INSTALL_DIR) $(1)/usr/lib/gnunet
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_sqlite.so* $(1)/usr/lib/gnunet/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_sqlite.so* $(1)/usr/lib/gnunet/
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/gnunet-secushare-sqlite.defaults $(1)/etc/uci-defaults/gnunet-secushare-sqlite
endef endef
$(eval $(call BuildPackage,gnunet-secushare)) $(eval $(call BuildPackage,gnunet-secushare))


+ 8
- 0
net/gnunet-secushare/files/gnunet-secushare-mysql.defaults View File

@ -0,0 +1,8 @@
#!/bin/sh
uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
uci -q batch <<EOF
set gnunet.psycstore.DATABASE=mysql
commit gnunet
EOF

net/gnunet/files/gnunet-social-pgsql.defaults → net/gnunet-secushare/files/gnunet-secushare-pgsql.defaults View File


net/gnunet/files/gnunet-social-sqlite.defaults → net/gnunet-secushare/files/gnunet-secushare-sqlite.defaults View File


Loading…
Cancel
Save