Browse Source

gnunet: update source, improve packaging

* always re-create config-file when service is started
 * use /lib/upgrade/keep.d instead of /etc/sysupgrade.conf sed'ery

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
lilik-openwrt-22.03
Daniel Golle 9 years ago
parent
commit
480be2b2d4
3 changed files with 9 additions and 19 deletions
  1. +2
    -15
      net/gnunet/Makefile
  2. +6
    -4
      net/gnunet/files/gnunet.init
  3. +1
    -0
      net/gnunet/files/gnunet.upgrade

+ 2
- 15
net/gnunet/Makefile View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
PKG_SOURCE_VERSION:=36068
PKG_SOURCE_VERSION:=36094
PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
@ -164,6 +164,7 @@ define Package/gnunet/install
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/hellos/* $(1)/usr/share/gnunet/hellos
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) ./files/gnunet.init $(1)/etc/init.d/gnunet
$(INSTALL_DATA) ./files/gnunet.upgrade $(1)/lib/upgrade/keep.d/gnunet
endef
define Build/InstallDev
@ -173,20 +174,6 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
endef
define Package/gnunet/postinst
#!/bin/sh
grep -qc "/etc/gnunet" "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null ||
echo "/etc/gnunet/" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf
endef
define Package/gnunet/postrm
#!/bin/sh
grep -qc "/etc/gnunet" "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null &&
sed -i '/\/etc\/gnunet/d' "$${IPKG_INSTROOT}"/etc/sysupgrade.conf
endef
DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg
BIN_conversation:=conversation conversation-test
LIB_conversation:=conversation microphone speaker


+ 6
- 4
net/gnunet/files/gnunet.init View File

@ -32,9 +32,11 @@ fix_libexec_permissions() {
}
prepare_config() {
mkdir -p $GNUNET_HOME
chown gnunet:gnunet $GNUNET_HOME
chmod 0750 $GNUNET_HOME
if [ ! -e "$GNUNET_HOME" ]; then
mkdir -p $GNUNET_HOME
chown gnunet:gnunet $GNUNET_HOME
chmod 0750 $GNUNET_HOME
fi
touch $CONFIGFILE
chown root:gnunet $CONFIGFILE
chmod 0640 $CONFIGFILE
@ -74,7 +76,7 @@ prepare_config() {
start_service() {
fix_libexec_permissions
[ ! -e $GNUNET_HOME ] && prepare_config
prepare_config
procd_open_instance
procd_set_param user gnunet


+ 1
- 0
net/gnunet/files/gnunet.upgrade View File

@ -0,0 +1 @@
/etc/gnunet

Loading…
Cancel
Save