Przeglądaj źródła

ipkg doesn't like underscores in package names

But as there are packages with names containing them, and other package
managers probably have less problems with that, fix this issue at the
most specific place.
Phil Sutter 16 lat temu
rodzic
commit
4897a9b15a
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      mk/package.mk

+ 2 - 2
mk/package.mk

@@ -160,7 +160,7 @@ IDEPEND_$(1):=	$$(strip $(4))
 _ALL_CONTROLS+=	$$(IDIR_$(1))/CONTROL/control
 _ALL_CONTROLS+=	$$(IDIR_$(1))/CONTROL/control
 ICONTROL_$(1)?=	$(WRKDIR)/.$(2).control
 ICONTROL_$(1)?=	$(WRKDIR)/.$(2).control
 $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE}
 $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE}
-	@echo "Package: $(2)" > $(WRKDIR)/.$(2).control
+	@echo "Package: $$(shell echo $(2) | tr '_' '-')" > $(WRKDIR)/.$(2).control
 	@echo "Section: $(6)" >> $(WRKDIR)/.$(2).control
 	@echo "Section: $(6)" >> $(WRKDIR)/.$(2).control
 	@echo "Description: $(5)" >> $(WRKDIR)/.$(2).control
 	@echo "Description: $(5)" >> $(WRKDIR)/.$(2).control
 	${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh $${IDIR_$(1)} $${ICONTROL_$(1)} $(3) ${CPU_ARCH}
 	${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh $${IDIR_$(1)} $${ICONTROL_$(1)} $(3) ${CPU_ARCH}
@@ -177,7 +177,7 @@ $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE}
 			comma=", "; \
 			comma=", "; \
 			last=$$$$dep; \
 			last=$$$$dep; \
 		done; \
 		done; \
-		echo "Depends: $$$$deps" >>$${IDIR_$(1)}/CONTROL/control; \
+		echo "Depends: $$$$deps" | tr '_' '-' >>$${IDIR_$(1)}/CONTROL/control; \
 	fi
 	fi
 	@for file in conffiles preinst postinst prerm postrm; do \
 	@for file in conffiles preinst postinst prerm postrm; do \
 		[ ! -f ./files/$(2).$$$$file ] || cp ./files/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file; \
 		[ ! -f ./files/$(2).$$$$file ] || cp ./files/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file; \