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>
This commit is contained in:
parent
185c195e4d
commit
480be2b2d4
3 changed files with 9 additions and 19 deletions
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=gnunet
|
PKG_NAME:=gnunet
|
||||||
PKG_SOURCE_VERSION:=36068
|
PKG_SOURCE_VERSION:=36094
|
||||||
PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
|
PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
|
||||||
PKG_RELEASE:=1
|
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_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/hellos/* $(1)/usr/share/gnunet/hellos
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||||
$(INSTALL_BIN) ./files/gnunet.init $(1)/etc/init.d/gnunet
|
$(INSTALL_BIN) ./files/gnunet.init $(1)/etc/init.d/gnunet
|
||||||
|
$(INSTALL_DATA) ./files/gnunet.upgrade $(1)/lib/upgrade/keep.d/gnunet
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
|
@ -173,20 +174,6 @@ define Build/InstallDev
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
|
||||||
endef
|
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
|
DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg
|
||||||
BIN_conversation:=conversation conversation-test
|
BIN_conversation:=conversation conversation-test
|
||||||
LIB_conversation:=conversation microphone speaker
|
LIB_conversation:=conversation microphone speaker
|
||||||
|
|
|
@ -32,9 +32,11 @@ fix_libexec_permissions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_config() {
|
prepare_config() {
|
||||||
|
if [ ! -e "$GNUNET_HOME" ]; then
|
||||||
mkdir -p $GNUNET_HOME
|
mkdir -p $GNUNET_HOME
|
||||||
chown gnunet:gnunet $GNUNET_HOME
|
chown gnunet:gnunet $GNUNET_HOME
|
||||||
chmod 0750 $GNUNET_HOME
|
chmod 0750 $GNUNET_HOME
|
||||||
|
fi
|
||||||
touch $CONFIGFILE
|
touch $CONFIGFILE
|
||||||
chown root:gnunet $CONFIGFILE
|
chown root:gnunet $CONFIGFILE
|
||||||
chmod 0640 $CONFIGFILE
|
chmod 0640 $CONFIGFILE
|
||||||
|
@ -74,7 +76,7 @@ prepare_config() {
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
fix_libexec_permissions
|
fix_libexec_permissions
|
||||||
[ ! -e $GNUNET_HOME ] && prepare_config
|
prepare_config
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param user gnunet
|
procd_set_param user gnunet
|
||||||
|
|
1
net/gnunet/files/gnunet.upgrade
Normal file
1
net/gnunet/files/gnunet.upgrade
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/etc/gnunet
|
Loading…
Reference in a new issue