Makefile: add install target
Add a simple install target that we can reference in the specfile.
This commit is contained in:
parent
a1d1c4b72e
commit
7824d047db
1 changed files with 21 additions and 0 deletions
21
Makefile
21
Makefile
|
|
@ -1,5 +1,9 @@
|
|||
PACKAGE_NAME = image-builder-frontend
|
||||
INSTALL_DIR = /share/cockpit/$(PACKAGE_NAME)
|
||||
APPSTREAMFILE=org.image-builder.$(PACKAGE_NAME).metainfo.xml
|
||||
|
||||
VERSION := $(shell (cd "$(SRCDIR)" && grep "^Version:" cockpit/$(PACKAGE_NAME).spec | sed 's/[^[:digit:]]*\([[:digit:]]\+\).*/\1/'))
|
||||
COMMIT = $(shell (cd "$(SRCDIR)" && git rev-parse HEAD))
|
||||
|
||||
# TODO: figure out a strategy for keeping this updated
|
||||
COCKPIT_REPO_COMMIT = b0e82161b4afcb9f0a6fddd8ff94380e983b2238
|
||||
|
|
@ -16,6 +20,14 @@ COCKPIT_REPO_FILES = \
|
|||
help:
|
||||
@cat Makefile
|
||||
|
||||
#
|
||||
# Install target for specfile
|
||||
#
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
$(MAKE) cockpit/install
|
||||
|
||||
#
|
||||
# Cockpit related targets
|
||||
#
|
||||
|
|
@ -25,6 +37,15 @@ cockpit/clean:
|
|||
rm -f cockpit/public/*.css
|
||||
rm -f cockpit/public/*.js
|
||||
|
||||
.PHONY: cockpit/install
|
||||
cockpit/install:
|
||||
mkdir -p $(DESTDIR)$(PREFIX)$(INSTALL_DIR)
|
||||
cp -a cockpit/public/* $(DESTDIR)$(PREFIX)$(INSTALL_DIR)
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/metainfo
|
||||
msgfmt --xml -d po \
|
||||
--template cockpit/public/$(APPSTREAMFILE) \
|
||||
-o $(DESTDIR)$(PREFIX)/share/metainfo/$(APPSTREAMFILE)
|
||||
|
||||
.PHONY: cockpit/devel-uninstall
|
||||
cockpit/devel-uninstall: PREFIX=~/.local
|
||||
cockpit/devel-uninstall:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue