-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuilder_genspec.sh
executable file
·59 lines (43 loc) · 1.19 KB
/
builder_genspec.sh
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
#!/bin/bash
[ -n "$PMM_VERSION" ] || { echo "PMM_VERSION must be defined (x.y.z.nnnn)."; exit 1; }
[ -n "$PROJ_REL" ] || { echo "PROJ_REL must be defined (rc_commit)."; exit 1; }
rpmName="pmm-smppsink-base"
rpmSpecFile=${HOME}/rpmbuild/SPECS/${rpmName}.spec
rm -f $rpmSpecFile
### base packages
cat >"${rpmSpecFile}" <<_SPEC_
%define debug_package %{nil}
%define _unpackaged_files_terminate_build 0
%define buildroot_bak %{buildroot}
%define _source_filedigest_algorithm 0
%define _binary_filedigest_algorithm 0
%define _source_payload w6.bzdio
%define _binary_payload w6.bzdio
Name: ${rpmName}
Version: ${PMM_VERSION}
Release: ${PROJ_REL}
Summary: pmm smppsink
Group: Applications/System
License: Proprietary
Source0: ${rpmName}-${PMM_VERSION}.tar
BuildRequires: esl-erlang > 18
BuildRequires: libuuid-devel git net-snmp-utils tokyocabinet-devel ncurses-devel gcc-c++ zlib-devel bzip2-devel
%description
%pre
#id bms > /dev/null || exit 1
%prep
%setup -c -q
%build
make
%install
mkdir -p %{buildroot}/opt/smppsink
mkdir -p %{buildroot}/opt/smppsink/etc
#find _build/ | sort
cd _build/default/rel/smppsink
cp -a . %{buildroot}/opt/smppsink/
%clean
rm -rf %{buildroot}
%files
/opt/smppsink/
_SPEC_
###