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>
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 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=gnunet
11
-PKG_SOURCE_VERSION:=36068
11
+PKG_SOURCE_VERSION:=36094
12 12
 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
13 13
 PKG_RELEASE:=1
14 14
 
@@ -164,6 +164,7 @@ define Package/gnunet/install
164 164
 	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/hellos/* $(1)/usr/share/gnunet/hellos
165 165
 	$(INSTALL_DIR) $(1)/etc/init.d/
166 166
 	$(INSTALL_BIN) ./files/gnunet.init $(1)/etc/init.d/gnunet
167
+	$(INSTALL_DATA) ./files/gnunet.upgrade $(1)/lib/upgrade/keep.d/gnunet
167 168
 endef
168 169
 
169 170
 define Build/InstallDev
@@ -173,20 +174,6 @@ define Build/InstallDev
173 174
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
174 175
 endef
175 176
 
176
-define Package/gnunet/postinst
177
-#!/bin/sh
178
-grep -qc "/etc/gnunet" "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null ||
179
-	echo "/etc/gnunet/" >> "$${IPKG_INSTROOT}"/etc/sysupgrade.conf
180
-
181
-endef
182
-
183
-define Package/gnunet/postrm
184
-#!/bin/sh
185
-grep -qc "/etc/gnunet" "$${IPKG_INSTROOT}"/etc/sysupgrade.conf >/dev/null &&
186
-	sed -i '/\/etc\/gnunet/d' "$${IPKG_INSTROOT}"/etc/sysupgrade.conf
187
-
188
-endef
189
-
190 177
 DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg
191 178
 BIN_conversation:=conversation conversation-test
192 179
 LIB_conversation:=conversation microphone speaker

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

@@ -32,9 +32,11 @@ fix_libexec_permissions() {
32 32
 }
33 33
 
34 34
 prepare_config() {
35
-	mkdir -p $GNUNET_HOME
36
-	chown gnunet:gnunet $GNUNET_HOME
37
-	chmod 0750 $GNUNET_HOME
35
+	if [ ! -e "$GNUNET_HOME" ]; then
36
+		mkdir -p $GNUNET_HOME
37
+		chown gnunet:gnunet $GNUNET_HOME
38
+		chmod 0750 $GNUNET_HOME
39
+	fi
38 40
 	touch $CONFIGFILE
39 41
 	chown root:gnunet $CONFIGFILE
40 42
 	chmod 0640 $CONFIGFILE
@@ -74,7 +76,7 @@ prepare_config() {
74 76
 
75 77
 start_service() {
76 78
 	fix_libexec_permissions
77
-	[ ! -e $GNUNET_HOME ] && prepare_config
79
+	prepare_config
78 80
 
79 81
 	procd_open_instance
80 82
 	procd_set_param user gnunet

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

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