Show More
@@ -1,6 +1,8 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 | # |
|
2 | # | |
3 | # Build a Mercurial RPM in place. |
|
3 | # Build a Mercurial RPM in place. | |
|
4 | # Known to work on: | |||
|
5 | # - Fedora 9 | |||
4 | # |
|
6 | # | |
5 | # Bryan O'Sullivan <bos@serpentine.com> |
|
7 | # Bryan O'Sullivan <bos@serpentine.com> | |
6 |
|
8 | |||
@@ -12,7 +14,7 b' if [ -z "$root" ]; then' | |||||
12 | exit 1 |
|
14 | exit 1 | |
13 | fi |
|
15 | fi | |
14 |
|
16 | |||
15 | rpmdir=/tmp/"`basename $root | sed 's/ /_/'`"-rpm |
|
17 | rpmdir=/tmp/"`basename $root | sed 's/ /_/'`"-rpm # FIXME: Insecure /tmp handling | |
16 |
|
18 | |||
17 | cd "$root" |
|
19 | cd "$root" | |
18 | rm -rf $rpmdir |
|
20 | rm -rf $rpmdir | |
@@ -24,7 +26,7 b' if [ ! -f $specfile ]; then' | |||||
24 | exit 1 |
|
26 | exit 1 | |
25 | fi |
|
27 | fi | |
26 |
|
28 | |||
27 | tmpspec=/tmp/`basename "$specfile"`.$$ |
|
29 | tmpspec=/tmp/`basename "$specfile"`.$$ # FIXME: Insecure /tmp handling | |
28 | # Use the most recent tag as the version. |
|
30 | # Use the most recent tag as the version. | |
29 | version=`hg tags | perl -e 'while(<STDIN>){if(/^(\d\S+)/){print$1;exit}}'` |
|
31 | version=`hg tags | perl -e 'while(<STDIN>){if(/^(\d\S+)/){print$1;exit}}'` | |
30 | # Compute the release number as the difference in revision numbers |
|
32 | # Compute the release number as the difference in revision numbers | |
@@ -58,5 +60,6 b' if [ $? = 0 ]; then' | |||||
58 | rm -rf $tmpspec $rpmdir/BUILD |
|
60 | rm -rf $tmpspec $rpmdir/BUILD | |
59 | mv $rpmdir/RPMS/*/* $rpmdir && rm -r $rpmdir/RPMS |
|
61 | mv $rpmdir/RPMS/*/* $rpmdir && rm -r $rpmdir/RPMS | |
60 | echo |
|
62 | echo | |
61 | echo "Packages are in $rpmdir" |
|
63 | echo "Packages are in $rpmdir:" | |
|
64 | ls -l $rpmdir/*.rpm | |||
62 | fi |
|
65 | fi |
@@ -55,6 +55,9 b' lisp_dir=$RPM_BUILD_ROOT%{_datadir}/emac' | |||||
55 | mkdir -p $lisp_dir |
|
55 | mkdir -p $lisp_dir | |
56 | install contrib/mercurial.el $lisp_dir |
|
56 | install contrib/mercurial.el $lisp_dir | |
57 |
|
57 | |||
|
58 | # We don't want this, do we? | |||
|
59 | rm -f $RPM_BUILD_ROOT%{pythonlib}/../mercurial-*-py2.5.egg-info | |||
|
60 | ||||
58 | %clean |
|
61 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT |
|
62 | rm -rf $RPM_BUILD_ROOT | |
60 |
|
63 | |||
@@ -69,7 +72,6 b' rm -rf $RPM_BUILD_ROOT' | |||||
69 | %{_datadir}/emacs/site-lisp/mercurial.el |
|
72 | %{_datadir}/emacs/site-lisp/mercurial.el | |
70 | %{_bindir}/hg |
|
73 | %{_bindir}/hg | |
71 | %{_bindir}/hgk |
|
74 | %{_bindir}/hgk | |
72 | %{_bindir}/hgmerge |
|
|||
73 | %{_bindir}/hg-ssh |
|
75 | %{_bindir}/hg-ssh | |
74 | %{_bindir}/hg-viz |
|
76 | %{_bindir}/hg-viz | |
75 | %{_bindir}/git-rev-tree |
|
77 | %{_bindir}/git-rev-tree | |
@@ -80,3 +82,6 b' rm -rf $RPM_BUILD_ROOT' | |||||
80 | %{pythonlib}/*.so |
|
82 | %{pythonlib}/*.so | |
81 | %{hgext}/*.py* |
|
83 | %{hgext}/*.py* | |
82 | %{hgext}/convert/*.py* |
|
84 | %{hgext}/convert/*.py* | |
|
85 | %{hgext}/inotify/*.py* | |||
|
86 | %{hgext}/highlight/*.py* | |||
|
87 | %{hgext}/inotify/linux/ |
General Comments 0
You need to be logged in to leave comments.
Login now