Skip to content

Commit fc66097

Browse files
committed
fix resource linker for dsm6
- fixes SynoCommunity#4578 for packages without specific conf files
1 parent 35e4364 commit fc66097

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

mk/spksrc.service.mk

+6-3
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ ifneq ($(strip $(SERVICE_WIZARD_SHARE)),)
170170
'."data-share" = {"shares": [{"name": $$share, "permission":{"rw":[$$user]}} ] }' $@ 1<>$@
171171
endif
172172
SERVICE_FILES += $(DSM_CONF_DIR)/resource
173+
ifneq ($(findstring conf,$(SPK_CONTENT)),conf)
174+
SPK_CONTENT += conf
175+
endif
173176

174177
# Less than DSM 6.0
175178
else
@@ -182,13 +185,13 @@ endif
182185
endif
183186

184187

185-
DSM_SCRIPTS_ += service-setup
188+
DSM_SCRIPT_FILES += service-setup
186189
SERVICE_FILES += $(DSM_SCRIPTS_DIR)/service-setup
187190

188191

189192
# Control use of generic installer
190193
ifeq ($(strip $(INSTALLER_SCRIPT)),)
191-
DSM_SCRIPTS_ += installer
194+
DSM_SCRIPT_FILES += installer
192195
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
193196
$(DSM_SCRIPTS_DIR)/installer: $(SPKSRC_MK)spksrc.service.installer.dsm7
194197
@$(dsm_script_copy)
@@ -204,7 +207,7 @@ endif
204207

205208
# Control use of generic start-stop-status scripts
206209
ifeq ($(strip $(SSS_SCRIPT)),)
207-
DSM_SCRIPTS_ += start-stop-status
210+
DSM_SCRIPT_FILES += start-stop-status
208211
ifeq ($(STARTABLE),no)
209212
$(DSM_SCRIPTS_DIR)/start-stop-status: $(SPKSRC_MK)spksrc.service.non-startable
210213
@$(dsm_script_copy)

mk/spksrc.spk.mk

+21-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
### Rules to create the spk package
2+
# Most of the rules are imported from spksrc.*.mk files
3+
#
4+
# Variables used in this file:
5+
# NAME: The internal name of the package.
6+
# Note that all synocoummunity packages use lowercase names.
7+
# This enables to have concurrent packages with synology.com, that use
8+
# package names starting with upper case letters.
9+
# (e.g. Mono => synology.com, mono => synocommunity.com)
10+
# SPK_FILE_NAME: The full spk name with folder, package name, arch, tc- and package version.
11+
# SPK_CONTENT: List of files and folders that are added to package.tgz within the spk file.
12+
# DSM_SCRIPT_FILES: List of script files that are in the scripts folder within the spk file.
13+
#
14+
115
# Common makefiles
216
include ../../mk/spksrc.common.mk
317
include ../../mk/spksrc.directories.mk
@@ -58,26 +72,26 @@ include ../../mk/spksrc.strip.mk
5872
DSM_SCRIPTS_DIR = $(WORK_DIR)/scripts
5973

6074
# Generated scripts
61-
DSM_SCRIPTS_ = preinst postinst
62-
DSM_SCRIPTS_ += preuninst postuninst
63-
DSM_SCRIPTS_ += preupgrade postupgrade
75+
DSM_SCRIPT_FILES = preinst postinst
76+
DSM_SCRIPT_FILES += preuninst postuninst
77+
DSM_SCRIPT_FILES += preupgrade postupgrade
6478

6579
# SPK specific scripts
6680
ifneq ($(strip $(SSS_SCRIPT)),)
67-
DSM_SCRIPTS_ += start-stop-status
81+
DSM_SCRIPT_FILES += start-stop-status
6882

6983
$(DSM_SCRIPTS_DIR)/start-stop-status: $(SSS_SCRIPT)
7084
@$(dsm_script_copy)
7185
endif
7286

7387
ifneq ($(strip $(INSTALLER_SCRIPT)),)
74-
DSM_SCRIPTS_ += installer
88+
DSM_SCRIPT_FILES += installer
7589

7690
$(DSM_SCRIPTS_DIR)/installer: $(INSTALLER_SCRIPT)
7791
@$(dsm_script_copy)
7892
endif
7993

80-
DSM_SCRIPTS_ += $(notdir $(basename $(ADDITIONAL_SCRIPTS)))
94+
DSM_SCRIPT_FILES += $(notdir $(basename $(ADDITIONAL_SCRIPTS)))
8195

8296
SPK_CONTENT = package.tgz INFO scripts
8397

@@ -249,7 +263,7 @@ $(WORK_DIR)/package.tgz: icon service
249263
@[ -f $@ ] && rm $@ || true
250264
(cd $(STAGING_DIR) && tar cpzf $@ --owner=root --group=root *)
251265

252-
DSM_SCRIPTS = $(addprefix $(DSM_SCRIPTS_DIR)/,$(DSM_SCRIPTS_))
266+
DSM_SCRIPTS = $(addprefix $(DSM_SCRIPTS_DIR)/,$(DSM_SCRIPT_FILES))
253267

254268
define dsm_script_redirect
255269
$(create_target_dir)

0 commit comments

Comments
 (0)