You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

45 lines
888 B

PLUGIN_NAME := plymouth
PLUGINS_PATH := $(DESTDIR)/lib/rc/plugins
PKG_NAME := $(PLUGIN_NAME)-openrc-plugin
PKG_VERSION := 0.1.2
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
%.tar.bz2: %.tar
$(BZIP2) $<
%.tar.gz: %.tar
$(GZIP) $<
.PHONY: archive clean install uninstall upload
$(PLUGIN_NAME).so: $(PLUGIN_NAME).o
$(CC) $(LDFLAGS) -Wl,-soname,$@ $+ -o $@ $(LDLIBS)
clean:
$(RM) *.o *.so
install: $(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/$(PKG_NAME)/