pmt: initial 2.5.0 update
This commit is contained in:
9
build/deb/DEBIAN/control_32
Executable file
9
build/deb/DEBIAN/control_32
Executable file
@@ -0,0 +1,9 @@
|
||||
Source: pmt
|
||||
Package: pmt
|
||||
Version: 2.5.0
|
||||
Architecture: arm
|
||||
Description: pmt is for reading, writing and formatting partitions of android devices
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: YZBruh <yagizzengin73@gmail.com>
|
||||
Standards-Version: 4.5.0
|
||||
9
build/deb/DEBIAN/control_64
Executable file
9
build/deb/DEBIAN/control_64
Executable file
@@ -0,0 +1,9 @@
|
||||
Source: pmt
|
||||
Package: pmt
|
||||
Version: 2.5.0
|
||||
Architecture: aarch64
|
||||
Description: pmt is for reading, writing and formatting partitions of android devices
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: YZBruh <yagizzengin73@gmail.com>
|
||||
Standards-Version: 4.5.0
|
||||
0
build/deb/data/data/com.termux/files/usr/bin/dummy
Executable file
0
build/deb/data/data/com.termux/files/usr/bin/dummy
Executable file
0
build/deb/data/data/com.termux/files/usr/share/man/man8/dummy
Executable file
0
build/deb/data/data/com.termux/files/usr/share/man/man8/dummy
Executable file
99
build/deb/deb.mk
Executable file
99
build/deb/deb.mk
Executable file
@@ -0,0 +1,99 @@
|
||||
# By YZBruh
|
||||
|
||||
# Copyright 2024 Partition Manager
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#####
|
||||
# sub-make for making deb package
|
||||
#####
|
||||
|
||||
THIS_IS := debutils
|
||||
|
||||
# include needed variables
|
||||
include ../../Makefile.inc
|
||||
|
||||
TEMP_DIR := $(DEBUTILS_DIR)/template
|
||||
|
||||
ifeq ($(FOR_THIS),64)
|
||||
DEB_ARCH_NAME := arm64-v8a
|
||||
else ifeq ($(FOR_THIS),32)
|
||||
DEB_ARCH_NAME := armeabi-v7a
|
||||
endif
|
||||
|
||||
# controls the presence of file/directory. usage: $(call check_local,<FILE_OR_DIRECTORY_PATH>,<PACKAGE_STAT: 1, NULL>)
|
||||
define check_local
|
||||
# the first argument is taken and controlled by the file/directory with -e option
|
||||
if [ ! -e $1 ]; then \
|
||||
if [ $2 = 1 ]; then \
|
||||
printf " - Package not builded! Please build package and try again.\n"; \
|
||||
else \
|
||||
printf " ==> Not found: $1\n"; \
|
||||
fi; \
|
||||
if [ -d "$(TEMP_DIR)" ]; then \
|
||||
rm -rf $(TEMP_DIR); \
|
||||
fi; \
|
||||
exit 1; \
|
||||
fi;
|
||||
endef
|
||||
|
||||
# make deb package
|
||||
all:
|
||||
$(hide)printf " --------- Making deb package ---------\n"
|
||||
# remove template directory
|
||||
$(call erase,$(TEMP_DIR))
|
||||
$(hide)printf " - Checking files and directories (only neededs)...\n"
|
||||
# check some files and directories with parsing DEB_CHECKS variable
|
||||
$(foreach deb_chfile, \
|
||||
$(DEB_CHECKS), \
|
||||
$(call check_local,$(deb_chfile)) \
|
||||
)
|
||||
# check build status
|
||||
$(call check_local, \
|
||||
$(BINARY_DIR)/pmt, \
|
||||
1 \
|
||||
)
|
||||
# make template and output directories
|
||||
$(call mdir,$(TEMP_DIR),"y")
|
||||
$(call mdir,$(DEB_DIR),"y")
|
||||
$(hide)printf " - Copying files...\n"
|
||||
# prepare
|
||||
$(hide)cp -r $(DEBUTILS_DIR)/data $(TEMP_DIR) || exit 1
|
||||
$(hide)rm -f $(DEBTERMUX_USR)/share/man/man1/dummy
|
||||
$(hide)rm -f $(DEBTERMUX_USR)/bin/dummy
|
||||
$(call mdir,$(TEMP_DIR)/DEBIAN)
|
||||
$(hide)abort() { \
|
||||
if [ -d $(TEMP_DIR) ]; then \
|
||||
rm -rf $(TEMP_DIR); \
|
||||
fi; \
|
||||
if [ -d $(DEB_DIR) ]; then \
|
||||
rm -rf $(DEB_DIR); \
|
||||
fi; \
|
||||
exit 1; \
|
||||
}; \
|
||||
if [ ! "$(FOR_THIS)" = "64" ] && [ ! "$(FOR_THIS)" = "32" ]; then \
|
||||
printf " - İnvalid arch number: $(FOR_THIS)\n" && abort; \
|
||||
fi; \
|
||||
printf " - Selected arm-$(FOR_THIS) package control file.\n"; \
|
||||
cp $(DEBUTILS_DIR)/DEBIAN/control_$(FOR_THIS) $(TEMP_DIR)/DEBIAN/control || abort; \
|
||||
cp $(DEBUTILS_DIR)/mandoc/$(TARGET).8.gz $(DEBTERMUX_USR)/share/man/man8 || abort; \
|
||||
cp $(BINARY_DIR)/$(TARGET) $(DEBTERMUX_USR)/bin || abort; \
|
||||
printf " - Starting dpkg-deb...\n"; \
|
||||
sleep 2; \
|
||||
chmod -R 755 *; \
|
||||
dpkg-deb -b $(TEMP_DIR) $(DEB_DIR)/$(TARGET)-$(DEB_ARCH_NAME).deb || abort; \
|
||||
# cleanup template directory
|
||||
rm -rf $(TEMP_DIR); \
|
||||
printf " - Done!\n"
|
||||
|
||||
# end
|
||||
BIN
build/deb/mandoc/pmt.8.gz
Executable file
BIN
build/deb/mandoc/pmt.8.gz
Executable file
Binary file not shown.
Reference in New Issue
Block a user