-
Notifications
You must be signed in to change notification settings - Fork 0
/
makerpm.sh
executable file
·58 lines (46 loc) · 1.04 KB
/
makerpm.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
#!/bin/bash -e
BUILD_ARCH=x86_64
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPTDIR
PACKAGENAME="jsonMerger"
echo "removing old build area"
rm -rf /tmp/jsonMerger-build-tmp
echo "creating new build area"
mkdir /tmp/jsonMerger-build-tmp
ls
cd /tmp/jsonMerger-build-tmp
mkdir BUILD
mkdir RPMS
TOPDIR=$PWD
echo "working in $PWD"
cd $TOPDIR
# we are done here, write the specs and make the fu***** rpm
cat > jsonMerger.spec <<EOF
Name: $PACKAGENAME
Version: 0.1
Release: 2
Summary: jsonMerger tool
License: gpl
Group: DAQ
Packager: smorovic
Source: none
%define _topdir $TOPDIR
BuildArch: $BUILD_ARCH
AutoReqProv: no
Provides:/usr/bin/jsonMerger
%description
jsonMerger tool
%prep
%build
#todo
%install
rm -rf \$RPM_BUILD_ROOT
mkdir -p \$RPM_BUILD_ROOT
%__install -d "%{buildroot}/usr/bin"
mkdir -p usr/bin
cp $SCRIPTDIR/jsonMerger %{buildroot}/usr/bin/jsonMerger
%files
%defattr(-, root, root, -)
%attr( 755 ,root, root) /usr/bin/jsonMerger
EOF
rpmbuild --target noarch --define "_topdir `pwd`/RPMBUILD" -bb jsonMerger.spec