#78 Add Makefile targets for system-wide (un)installation
Merged 4 years ago by ralph. Opened 4 years ago by adamwill.
fedora-ci/ adamwill/messages make-install  into  master

file modified
+16
@@ -1,4 +1,9 @@ 

  TMP=tmp

+ INSTALL=install

+ INSTALL_PROGRAM=$(INSTALL)

+ INSTALL_DATA=$(INSTALL) -m 644

+ datadir=/usr/share

+ schemadestdir=$(datadir)/message-schemas/ci

  

  # Convert, test and clean up by default.

  all: convert test clean
@@ -24,6 +29,17 @@ 

  	@touch $@

  	@echo " passed."

  

+ install: $(SCHEMAS)

+ 	@echo -n "Installing to $(DESTDIR)$(schemadestdir)..."

+ 	@mkdir -p $(DESTDIR)$(schemadestdir)

+ 	@$(INSTALL_DATA) $^ $(DESTDIR)$(schemadestdir)

+ 	@echo " done."

+ 

+ uninstall:

+ 	@echo -n "Removing $(DESTDIR)$(schemadestdir)..."

+ 	@rm -rf $(DESTDIR)$(schemadestdir)

+ 	@echo " done."

+ 

  test: $(EXAMPLES)

  

  # Clean up stuff.

This is intended especially to facilitate the Python wrapper I
designed - https://pagure.io/fedora-qa/python-ci_messages/ - but
could also be useful for other purposes.

Signed-off-by: Adam Williamson awilliam@redhat.com

Bikeshed: directory name? I made it up on the spur of the moment. I'm not sure if it's worth trying to come up with some more 'designed' approach so e.g. other packages could publish schemas for other message topic groups, so /usr/share/message-schemas/ci for ci.* messages, perhaps...

@jcline @ralph

Maybe /usr/share/fedora-message-schema/ since message-schema is a pretty generic name to grab in /usr/share, and then yeah, namespace by the topic. A directory by top-level topic section sounds reasonable.

yay, bikeshed time! :)

This isn't just a 'Fedora' schema, though, that's the somewhat-tricky part. At least AIUI. It living in fedora-ci is just sort of an implementation detail; there are e.g. RH-internal systems publishing messages according to these schemas.

@ralph etc., do we have an official name for this thing? Is it just "CI Messages"?

Yeah, just "CI Messages" is sufficiently vague. No official name that I know of.

/usr/share/message-schemas/ci/ works for me!

rebased onto c77e284

4 years ago

OK, tweaked to /usr/share/message-schemas/ci/. Also tweaked how $DESTDIR is used a bit because I think it's better this way (if you want to override schemadestdir you probably shouldn't have to include $(DESTDIR) in the overridden definition).

Pull-Request has been merged by ralph

4 years ago
Metadata