Magellan Linux

Contents of /smage/trunk/extras/drbd-utils/drbd-utils-9.27.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17807 - (show annotations) (download)
Thu Dec 28 15:02:03 2023 UTC (5 months, 1 week ago) by niro
File size: 2284 byte(s)
-ver bump to 9.27.0-r1
1 # $Id$
2
3 PNAME="drbd-utils"
4 PVER="9.27.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 }