Contents of /smage/branches/alx08x-unstable/extras/drbd-utils/drbd-utils-9.26.0-r1.smage2
Parent Directory | Revision Log
Revision 17391 -
(show annotations)
(download)
Wed Nov 22 10:50:07 2023 UTC (10 months ago) by niro
File size: 2284 byte(s)
Wed Nov 22 10:50:07 2023 UTC (10 months ago) by niro
File size: 2284 byte(s)
-release branches/alx08x-unstable
1 | # $Id$ |
2 | |
3 | PNAME="drbd-utils" |
4 | PVER="9.26.0" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="sys-fs" |
8 | |
9 | DESCRIPTION="Userland tools for Distributed Replicated Block Device." |
10 | HOMEPAGE="https://www.drbd.org/" |
11 | |
12 | DEPEND=">= app-shells/bash-4 |
13 | >= dev-lang/perl-5 |
14 | >= sys-apps/keyutils-1.6" |
15 | |
16 | SDEPEND=">= dev-libs/libxslt-1.1 |
17 | >= app-text/docbook-xsl-stylesheets-1.76 |
18 | >= virtual/sed |
19 | >= dev-libs/libxslt-dev-1.1 |
20 | >= sys-apps/keyutils-dev-1.6" |
21 | |
22 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
23 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
24 | |
25 | ALX_PKG_KEEP="etc |
26 | usr/$(mlibdir)/drbd |
27 | usr/lib/systemd |
28 | usr/lib/tmpfiles.d |
29 | usr/lib/udev |
30 | usr/sbin |
31 | var/lib/drbd" |
32 | sminclude udev systemd alx-split |
33 | |
34 | SRC_URI=( |
35 | https://pkg.linbit.com//downloads/drbd/utils/${SRCFILE} |
36 | mirror://${PNAME}/${SRCFILE} |
37 | ) |
38 | |
39 | UP2SEPERATOR="v" |
40 | UP2DATE="updatecmd https://github.com/LINBIT/drbd-utils/tags | grep -v -- '-rc' | highesttarball gz" |
41 | |
42 | src_prepare() |
43 | { |
44 | munpack ${SRCFILE} || die |
45 | cd ${SRCDIR} |
46 | |
47 | # from gentoo: respect multilib |
48 | sed -i -e "s:/lib/:/$(mlibdir)/:g" Makefile.in scripts/Makefile.in scripts/global_common.conf scripts/drbd.conf.example || die |
49 | sed -e "s:@prefix@/lib:@prefix@/$(mlibdir):" -e "s:(DESTDIR)/lib:(DESTDIR)/$(mlibdir):" -i user/*/Makefile.in || die |
50 | |
51 | # from gentoo: disable the survey participation |
52 | sed -i '/usage-count/ s/yes/no/' scripts/global_common.conf || die |
53 | |
54 | mautoreconf || die |
55 | } |
56 | |
57 | src_compile() |
58 | { |
59 | cd ${SRCDIR} |
60 | |
61 | mconfigure \ |
62 | --localstatedir=/var \ |
63 | --with-distro=generic \ |
64 | --without-bashcompletion \ |
65 | --with-initscripttype=systemd \ |
66 | --with-systemdunitdir=$(mget-systemd-unit-dir) \ |
67 | --with-tmpfilesdir=$(mget-systemd-tmpfilesdir) \ |
68 | --with-udev \ |
69 | --without-rgmanager \ |
70 | --without-pacemaker \ |
71 | --without-heartbeat \ |
72 | --without-83support \ |
73 | --without-xen \ |
74 | --with-prebuiltman \ |
75 | || die |
76 | |
77 | mmake || die |
78 | } |
79 | |
80 | alx_generic_src_install() |
81 | { |
82 | cd ${SRCDIR} |
83 | |
84 | mmake DESTDIR=${BINDIR} install || die |
85 | |
86 | # move hardcoded lib |
87 | mv ${BINDIR}/$(mlibdir)/drbd/* ${BINDIR}/usr/$(mlibdir)/drbd/ || die |
88 | rm -r ${BINDIR}/$(mlibdir) || die |
89 | |
90 | # remove runtime created dirs |
91 | rm -r ${BINDIR}/var/lock || die |
92 | rm -r ${BINDIR}/var/run || die |
93 | |
94 | minstalldocs COPYING ChangeLog README* scripts/drbd.conf.example || die |
95 | } |
96 | |
97 | preinstall_drbd-utils() |
98 | { |
99 | # always keep this files even if the user edited them |
100 | add_conf_prot_ignore /etc/drbd.d/global_common.conf |
101 | } |