From 00a6021aae396c140e786382007064f10ca254a1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 7 Feb 2016 18:00:44 -0500 Subject: Update librefetch to work with pacman 5. --- src/librefetch/librefetchdir/Makefile | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/librefetch/librefetchdir/Makefile (limited to 'src/librefetch/librefetchdir/Makefile') diff --git a/src/librefetch/librefetchdir/Makefile b/src/librefetch/librefetchdir/Makefile new file mode 100644 index 0000000..58116bb --- /dev/null +++ b/src/librefetch/librefetchdir/Makefile @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# librefetchdir/Makefile +# +# Copyright (C) 2016 Luke Shumaker +# +# License: GNU GPLv3+ +# +# This file is part of LibreFetch. +# +# LibreFetch is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# LibreFetch is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreFetch. If not, see . + +# new = +librefetchdir := $(dir $(lastword $(MAKEFILE_LIST))) + +old_makepkg := $(shell which makepkg) +old_library := $(shell $(shell grep LIBRARY= $(old_makepkg)); echo $$LIBRARY) + +new_makepkg = $(new)/makepkg +new_library = $(new)/libmakepkg + +targets += $(new_makepkg) +targets += $(patsubst $(old_library)/%,$(new_library)/%,$(shell find $(old_library) -type f)) +targets += $(new_library)/tidy/~source_date_epoch.sh + +all: $(targets) +.PHONY: all + +.SECONDARY: +.DELETE_ON_ERROR: + +$(new_makepkg): $(old_makepkg) $(librefetchdir)/makepkg.gen + <$^ | install -Dm755 /dev/stdin $@ + +$(new_library)/source.sh: \ +$(new_library)/%: $(old_library)/% $(librefetchdir)/libmakepkg/%.gen + <$^ | install -Dm755 /dev/stdin $@ + +$(new_library)/tidy/purge.sh $(new_library)/tidy/~source_date_epoch.sh: \ +$(new_library)/%: $(librefetchdir)/libmakepkg/% + mkdir -p $(@D) + ln -sfT $(abspath $< $@) + +$(new_library)/%: $(old_library)/% + mkdir -p $(@D) + ln -sfT $(abspath $< $@) -- cgit v1.2.3-2-g168b