Permalink
Browse files

Makefile: Tar archives rules and few other improvements.

  • Loading branch information...
1 parent bdd06cc commit 55600812377f4ad4abbcc4be14d1f89806f56d36 @aidecoe committed May 30, 2011
Showing with 23 additions and 2 deletions.
  1. +23 −2 Makefile
View
@@ -1,14 +1,26 @@
PLUGIN_NAME := plymouth
PLUGINS_PATH := $(DESTDIR)/lib/rc/plugins
+PKG_NAME := $(PLUGIN_NAME)-openrc-plugin
+PKG_VERSION := 0.1.1
+PKG := $(PKG_NAME)-$(PKG_VERSION)
+BZIP2 := bzip2 -f -9
+GZIP := gzip -f -9
CFLAGS += -fPIC -Wall
LDLIBS := -leinfo -lrc
LDFLAGS += -fPIC -shared
INSTALL := install -D
-.PHONY: install clean
+%.tar.bz2: %.tar
+ $(BZIP2) $<
+
+%.tar.gz: %.tar
+ $(GZIP) $<
+
+
+.PHONY: archive clean install uninstall upload
$(PLUGIN_NAME).so: $(PLUGIN_NAME).o
@@ -18,7 +30,16 @@ clean:
$(RM) *.o *.so
install: $(PLUGIN_NAME).so
- $(INSTALL) $(PLUGIN_NAME).so $(PLUGINS_PATH)/$(PLUGIN_NAME).so
+ $(INSTALL) $< $(PLUGINS_PATH)/$<
uninstall:
$(RM) $(PLUGINS_PATH)/$(PLUGIN_NAME).so
+
+
+$(PKG).tar: .git
+ git archive --format=tar --prefix=$(PKG)/ v$(PKG_VERSION) > $@
+
+archive: $(PKG).tar.bz2
+
+upload: $(PKG).tar.bz2
+ scp $< dev.gentoo.org:~/public_html/distfiles/sys-boot/$(PLUGIN_NAME)/

0 comments on commit 5560081

Please sign in to comment.