acl/packaging/Makefile

34 lines
865 B
Makefile
Raw Normal View History

##########################################################
#
# make PKG_NAME=acl-libs
# make PKG_NAME=acl-master
#
#########################################################
ifndef $(PKG_NAME)
PKG_NAME := acl-libs
endif
PKG_VERSION = $(shell grep '^Version:' $(PKG_NAME).spec | awk '{print $$2}')
PWD = $(shell pwd)
2022-07-13 19:00:31 +08:00
$(shell chmod +x control)
2022-07-13 18:57:58 +08:00
DEBUGINFO=$(shell ./control debuginfo )
all: libs
2022-07-13 18:57:58 +08:00
debuginfo:
tar:
@./control pack ${PKG_NAME}
libs: tar
@mkdir -p {BUILD,BUILDROOT,SRPMS,SPECS}
2023-03-13 11:08:28 +08:00
@rpmbuild --define "_topdir ${PWD}" --define "_sourcedir ${PWD}" \
--define "_rpmdir ${PWD}" ${DEBUGINFO} -bb $(PKG_NAME).spec
@echo Binary PRM for $(PKG_NAME) has been created under ${PWD}/ \
`rpm --eval '%{_arch}'`
clean cl:
@rm -rf $(PKG_NAME)-$(PKG_VERSION)
@rm -rf *.tar.gz
@rm -rf BUILD BUILDROOT SRPMS SPECS `rpm --eval '%{_arch}'`