summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/Makefile
blob: 37c1d7bd5feaf5894656ad8342afc5d4730e32f6 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# $OpenBSD: Makefile,v 1.65 2010/06/09 07:26:01 espie Exp $

.include <bsd.own.mk>

MAN1=pkg_add.1 pkg_info.1 pkg_create.1 pkg_delete.1 pkg_merge.1 \
	pkg.1 pkg_mklocatedb.1
MAN5=package.5
MAN8=pkg_check.8
MAN=${MAN1} ${MAN5} ${MAN8}
NOPROG=

POD2MAN=/usr/bin/pod2man

PACKAGES= \
    OpenBSD/Add.pm \
    OpenBSD/AddCreateDelete.pm \
    OpenBSD/AddDelete.pm \
    OpenBSD/ArcCheck.pm \
    OpenBSD/CollisionReport.pm \
    OpenBSD/Delete.pm \
    OpenBSD/Dependencies.pm \
    OpenBSD/Error.pm \
    OpenBSD/ForwardDependencies.pm \
    OpenBSD/Getopt.pm \
    OpenBSD/Handle.pm \
    OpenBSD/IdCache.pm \
    OpenBSD/Interactive.pm \
    OpenBSD/LibSpec.pm \
    OpenBSD/LibSpec/Build.pm \
    OpenBSD/Mtree.pm \
    OpenBSD/OldLibs.pm \
    OpenBSD/PackageInfo.pm \
    OpenBSD/PackageLocation.pm \
    OpenBSD/PackageLocator.pm \
    OpenBSD/PackageName.pm \
    OpenBSD/PackageRepository.pm \
    OpenBSD/PackageRepository/Installed.pm \
    OpenBSD/PackageRepository/SCP.pm \
    OpenBSD/PackageRepository/Source.pm \
    OpenBSD/PackageRepositoryList.pm \
    OpenBSD/PackingElement.pm \
    OpenBSD/PackingList.pm \
    OpenBSD/Paths.pm \
    OpenBSD/PkgAdd.pm \
    OpenBSD/PkgCfl.pm \
    OpenBSD/PkgCheck.pm \
    OpenBSD/PkgConfig.pm \
    OpenBSD/PkgCreate.pm \
    OpenBSD/PkgDelete.pm \
    OpenBSD/PkgInfo.pm \
    OpenBSD/PkgSpec.pm \
    OpenBSD/ProgressMeter/Term.pm \
    OpenBSD/ProgressMeter.pm \
    OpenBSD/Replace.pm \
    OpenBSD/RequiredBy.pm \
    OpenBSD/Search.pm \
    OpenBSD/Signature.pm \
    OpenBSD/SharedItems.pm \
    OpenBSD/SharedLibs.pm \
    OpenBSD/State.pm \
    OpenBSD/Subst.pm \
    OpenBSD/Temp.pm \
    OpenBSD/Tracker.pm \
    OpenBSD/Update.pm \
    OpenBSD/UpdateSet.pm \
    OpenBSD/Ustar.pm \
    OpenBSD/Vstat.pm \
    OpenBSD/md5.pm \
    OpenBSD/x509.pm

PACKAGEDIRS=OpenBSD  OpenBSD/PackageRepository OpenBSD/ProgressMeter \
    OpenBSD/LibSpec

SCRIPTS= \
    pkg_merge \
    pkg_mklocatedb \
    pkg

SCRIPTS_LNK = \
    pkg pkg_add \
    pkg pkg_check \
    pkg pkg_create \
    pkg pkg_delete \
    pkg pkg_info

LIBBASE=/usr/libdata/perl5

PODS= \
    OpenBSD::Getopt \
    OpenBSD::IdCache \
    OpenBSD::Intro \
    OpenBSD::Mtree \
    OpenBSD::PackageName \
    OpenBSD::PackingElement \
    OpenBSD::PackingList \
    OpenBSD::PkgCfl \
    OpenBSD::PkgSpec \
    OpenBSD::RequiredBy \
    OpenBSD::Search \
    OpenBSD::Ustar \
    OpenBSD::Vstat

_quick3p=

.for p in ${PODS}
.  ifndef NOMAN
MANALL+= $p.cat3p
MANSRCALL += $p.3p
MANSRC_COOKIE=stamp-mansrc.build
_quick3p+=$p.pod ${.OBJDIR}/$p.3p
.    ifdef MANPS
PSALL+= $p.ps3p
.    endif
.  else
MANSRC_COOKIE=
.  endif

$p.3p: pod/$p.pod
	${POD2MAN} --section=3p --official --name=$p ${.ALLSRC} $@
.endfor
.ifndef NOMAN
MANALL+=${MAN1:S/.1$/.cat1/}
MANALL+=${MAN5:S/.5$/.cat5/}
MANALL+=${MAN8:S/.8$/.cat8/}
.  ifdef MANPS
PSALL+= ${MAN1:S/.1$/.ps1/}
PSALL+= ${MAN5:S/.5$/.ps5/}
PSALL+= ${MAN8:S/.8$/.ps8/}
.  endif
.endif

mansrc.build:
.if !empty(_quick3p)
	cd ${.CURDIR}/pod && ${POD2MAN} --section=3p --official ${_quick3p}
.endif

all: ${MANSRC_COOKIE} .WAIT ${MANALL} ${PSALL}

stamp-mansrc.build:
	@cd ${.CURDIR} && exec ${MAKE} mansrc.build
	@touch $@

CLEANFILES= ${MANSRCALL} ${MANALL} stamp-mansrc.build

realinstall: 
.for i in ${PACKAGEDIRS}
	${INSTALL} -d -o ${LIBOWN} -g ${LIBGRP} -m ${DIRMODE} \
		${DESTDIR}${LIBBASE}/$i
.endfor
.for i in ${PACKAGES}
	${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
		${.CURDIR}/$i ${DESTDIR}${LIBBASE}/$i
.endfor
.for i in ${SCRIPTS}
	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
		${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
.endfor
.for i j in ${SCRIPTS_LNK}
	cd ${DESTDIR}${BINDIR} && ln -f $i $j
.endfor

.include <bsd.prog.mk>
.PHONY: mansrc.build