summaryrefslogtreecommitdiffstats
path: root/rules/template-patch
blob: 85109ab83d10eaa81ebe0875882654243008b0ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# -*-makefile-*-
# $Id$
#
# Copyright (C) 2003 by @AUTHOR@
#          
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
@PACKET@_PATCHES-PTXCONF_@PACKET@_@PATCH@ += @packet@-@patch@

#
# Paths and names
#
@PACKET@_@PATCH@_VERSION	= $(call get_option, \
	s/^PTXCONF_@PACKET@_\([0-9]\)_\([0-9]\)_\([0-9]\)_/\1.\2.\3/, @patch@)
@PACKET@_@PATCH@		= @NAME@-$(@PACKET@_@PATCH@_VERSION)
@PACKET@_@PATCH@_SUFFIX	= @SUFFIX@
@PACKET@_@PATCH@_URL		= @URL@/$(@PACKET@_@PATCH@).$(@PACKET@_@PATCH@_SUFFIX)
@PACKET@_@PATCH@_SOURCE	= $(SRCDIR)/$(@PACKET@_@PATCH@).$(@PACKET@_@PATCH@_SUFFIX)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

@packet@-@patch@_get: $(STATEDIR)/@packet@-@patch@.get

@packet@-@patch@_get_deps = \
	$(@PACKET@_@PATCH@_SOURCE)

$(STATEDIR)/@packet@-@patch@.get: $(@packet@-@patch@_get_deps)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(@PACKET@_@PATCH@_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(@PACKET@_@PATCH@_URL))

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

@packet@-@patch@_install: $(STATEDIR)/@packet@-@patch@.install

$(STATEDIR)/@packet@-@patch@.install: $(STATEDIR)/@packet@-@patch@.get
	@$(call targetinfo, $@)
	@$(call patch_apply, $(@PACKET@_@PATCH@_SOURCE), $(@PACKET@_DIR))
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

@packet@-@patch@_clean:
	rm -rf $(STATEDIR)/@packet@*

# vim: syntax=make