openmamba-rpm-config/Makefile

53 lines
1.3 KiB
Makefile
Raw Normal View History

2024-12-23 12:47:18 +01:00
# Makefile for openmamba-rpm-config
# Copyright (c) 2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Released under the terms of the GNU GPLv3 license
PACKAGE=openmamba-rpm-config
distdir = $(PACKAGE)-$(VERSION)
dist_archive = $(distdir).tar.bz2
include VERSION
# System locations
prefix = /usr
rpmdir = ${prefix}/lib/rpm
srcdir = .
DESTDIR =
INSTALL = /usr/bin/install
INSTALL_PROGRAM = ${INSTALL} -m 755
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_DIR = ${INSTALL} -d -m 755
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
all:
install-dirs:
@$(INSTALL_DIR) $(DESTDIR)$(rpmdir)/openmamba
install-data:
@$(INSTALL_DATA) openmamba/macros $(DESTDIR)$(rpmdir)/openmamba/macros
@$(INSTALL_DATA) openmamba/rpmrc $(DESTDIR)$(rpmdir)/openmamba/rpmrc
install-programs:
@$(INSTALL_SCRIPT) openmamba/brp-strip-lto $(DESTDIR)$(rpmdir)/openmamba/brp-strip-lto
install: install-dirs install-data install-programs
clean:
rm -f $(dist_archive)
dist: clean
@mkdir /tmp/$(distdir)
@cp -a * /tmp/$(distdir)/
@rm -f $(dist_archive);\
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
@rm -rf /tmp/$(distdir)
@echo "file \`$(dist_archive)' created"
dist-rpm: dist
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
mv -f $(PACKAGE)-$(VERSION).tar.bz2 $$rpm_sourcedir;\
echo "File $$rpm_sourcedir/$(PACKAGE)-$(VERSION).tar.bz2 created."