-
Notifications
You must be signed in to change notification settings - Fork 244
Expand file tree
/
Copy pathrpm.sh
More file actions
25 lines (20 loc) · 654 Bytes
/
rpm.sh
File metadata and controls
25 lines (20 loc) · 654 Bytes
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
#!/bin/bash
git clone https://github.com/netkiller/shell.git
topdir=~/rpmbuild
#rm -rf $topdir
mkdir -p $topdir/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
#echo "%_topdir ~/rpmbuild" > ~/.rpmmacros
#echo "%_tmppath /tmp" > ~/.rpmmacros
#echo "%packager Neo Chen <netkiller@msn.com>" > ~/.rpmmacros
#cat ~/.rpmmacros
cat << EOF >> ~/.rpmmacros
%_signature gpg
%_gpg_name Neo Chen (netkiller) <netkiller@msn.com>
%_gpgpath ~/.gnupg
%_gpgbin /usr/bin/gpg
EOF
#rpm -Vp
name=netkiller
rpmbuild -ba --sign test.spec --define "book ${name}"
rpm -qpi ~/rpmbuild/RPMS/x86_64/netkiller-${name}-*.x86_64.rpm
rpm -qpl ~/rpmbuild/RPMS/x86_64/netkiller-${name}-*.x86_64.rpm