pmt: Use timestamp instead of architecture in xz package name and use sudo when creating deb package
This commit is contained in:
0
SETUP-DEBS.md
Normal file → Executable file
0
SETUP-DEBS.md
Normal file → Executable file
@@ -31,6 +31,14 @@ else ifeq ($(FOR_THIS),32)
|
|||||||
DEB_ARCH_NAME := armeabi-v7a
|
DEB_ARCH_NAME := armeabi-v7a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard /dev/block/by-name),)
|
||||||
|
SUDO := su
|
||||||
|
else ifeq ($(wildcard /system/build.prop),)
|
||||||
|
SUDO := sudo
|
||||||
|
else
|
||||||
|
SUDO :=
|
||||||
|
endif
|
||||||
|
|
||||||
# controls the presence of file/directory. usage: $(call check_local,<FILE_OR_DIRECTORY_PATH>,<PACKAGE_STAT: 1, NULL>)
|
# controls the presence of file/directory. usage: $(call check_local,<FILE_OR_DIRECTORY_PATH>,<PACKAGE_STAT: 1, NULL>)
|
||||||
define check_local
|
define check_local
|
||||||
# the first argument is taken and controlled by the file/directory with -e option
|
# the first argument is taken and controlled by the file/directory with -e option
|
||||||
@@ -90,7 +98,7 @@ all:
|
|||||||
cp $(BINARY_DIR)/$(TARGET) $(DEBTERMUX_USR)/bin || abort; \
|
cp $(BINARY_DIR)/$(TARGET) $(DEBTERMUX_USR)/bin || abort; \
|
||||||
printf " - Starting dpkg-deb...\n"; \
|
printf " - Starting dpkg-deb...\n"; \
|
||||||
sleep 2; \
|
sleep 2; \
|
||||||
chmod -R 755 *; \
|
$(SUDO) chmod -R 755 *; \
|
||||||
dpkg-deb -b $(TEMP_DIR) $(DEB_DIR)/$(TARGET)-$(DEB_ARCH_NAME).deb || abort; \
|
dpkg-deb -b $(TEMP_DIR) $(DEB_DIR)/$(TARGET)-$(DEB_ARCH_NAME).deb || abort; \
|
||||||
# cleanup template directory
|
# cleanup template directory
|
||||||
rm -rf $(TEMP_DIR); \
|
rm -rf $(TEMP_DIR); \
|
||||||
|
|||||||
@@ -134,10 +134,10 @@ all:
|
|||||||
mv *.a $(STATICLIB_DIR) || abort_build; \
|
mv *.a $(STATICLIB_DIR) || abort_build; \
|
||||||
printf "\n - Generating package...\n"; \
|
printf "\n - Generating package...\n"; \
|
||||||
cp $(BINARY_DIR)/$(TARGET) $(PACKAGE_DIR) || abort_build; \
|
cp $(BINARY_DIR)/$(TARGET) $(PACKAGE_DIR) || abort_build; \
|
||||||
printf " XZ $(OUT_DIRNAME)/package/$(TARGET)-$(ARCH).xz"
|
printf " XZ $(OUT_DIRNAME)/package/$(TARGET)-`date +%Y%m%d`.xz"
|
||||||
xz $(PACKAGE_DIR)/$(TARGET) || abort_build; \
|
xz $(PACKAGE_DIR)/$(TARGET) || abort_build; \
|
||||||
sleep 1; \
|
sleep 1; \
|
||||||
mv $(PACKAGE_DIR)/$(TARGET).xz $(PACKAGE_DIR)/$(TARGET)-$(ARCH).xz || abort_build; \
|
mv $(PACKAGE_DIR)/$(TARGET).xz $(PACKAGE_DIR)/$(TARGET)-`date +%Y%m%d`.xz || abort_build; \
|
||||||
printf "\n - Success"; \
|
printf "\n - Success"; \
|
||||||
sleep 1; \
|
sleep 1; \
|
||||||
printf "\n\n ----------------------------------- \n"
|
printf "\n\n ----------------------------------- \n"
|
||||||
|
|||||||
Reference in New Issue
Block a user