myxx/Makefile

38 lines
1.2 KiB
Makefile
Raw Normal View History

2022-10-05 14:12:28 +00:00
V:=$(shell cat VERSION)
TOP_DIR:=$(shell pwd)
BUILD_DIR:=$(TOP_DIR)/build
DEB_DIR:=$(BUILD_DIR)/deb/myxx-cmake-$(V)
2022-10-06 18:07:22 +00:00
all: v deb pack
2022-10-05 14:12:28 +00:00
2022-10-06 18:07:22 +00:00
v:
2022-10-07 08:22:07 +00:00
sed -i "s/\/[0-9][0-9.]\+/\/$V/g" $(TOP_DIR)/README.md
sed -i "s/[0-9][0-9.]\+tar/$V.tar/g" $(TOP_DIR)/README.md
sed -i "s/[0-9][0-9.]\+_all/$(V)_all/g" $(TOP_DIR)/README.md
2022-10-05 14:12:28 +00:00
sed -i "s/CMake.*REQUIRED/CMake $V REQUIRED/" $(TOP_DIR)/README.md
sed -i "s/VERSION \".*\"/VERSION \"$V\"/" $(TOP_DIR)/MyxxCMake/MyxxCMakeConfigVersion.cmake
sed -i "s/VERSION .* LANG/VERSION $V LANG/" $(TOP_DIR)/debian/CMakeLists.txt
sed -i "s/(.*)/($(V))/" $(TOP_DIR)/debian/changelog
deb:
rm -rf $(DEB_DIR)
mkdir -p $(DEB_DIR)
cp -ap "$(TOP_DIR)/MyxxCMake" "$(TOP_DIR)/debian" "$(DEB_DIR)"
cd $(DEB_DIR); debuild
mv $(BUILD_DIR)/deb/*deb $(BUILD_DIR)
mv $(BUILD_DIR)/deb/*dsc $(BUILD_DIR)
mv $(BUILD_DIR)/deb/*xz $(BUILD_DIR)
pack:
tar acf $(BUILD_DIR)/myxx-cmake-local-$(V).tar.xz MyxxCMake
upload:
git tag $(V)
tea r c --repo cmake/myxx -t $(V) --tag $(V) \
-a $(BUILD_DIR)/myxx-cmake_$(V).dsc \
-a $(BUILD_DIR)/myxx-cmake_$(V).tar.xz \
-a $(BUILD_DIR)/myxx-cmake_$(V)_all.deb \
-a $(BUILD_DIR)/myxx-cmake-local-$(V).tar.xz
git tag -d $(V)
git push