##// END OF EJS Templates
packaging: use "python3" for fedora29 ... and as buildrpm default...
Mads Kiilerich -
r43675:51865531 stable
parent child Browse files
Show More
@@ -1,163 +1,163 b''
1 #!/bin/bash -e
1 #!/bin/bash -e
2 #
2 #
3 # Build a Mercurial RPM from the current repo, mainly for Fedora/CentOS/RHEL
3 # Build a Mercurial RPM from the current repo, mainly for Fedora/CentOS/RHEL
4
4
5 . $(dirname $0)/packagelib.sh
5 . $(dirname $0)/packagelib.sh
6
6
7 BUILD=1
7 BUILD=1
8 RPMBUILDDIR="$PWD/rpmbuild"
8 RPMBUILDDIR="$PWD/rpmbuild"
9 PYTHONEXE=python2
9 PYTHONEXE=python3
10
10
11 while [ "$1" ]; do
11 while [ "$1" ]; do
12 case "$1" in
12 case "$1" in
13 --prepare )
13 --prepare )
14 shift
14 shift
15 BUILD=
15 BUILD=
16 ;;
16 ;;
17 --python)
17 --python)
18 shift
18 shift
19 PYTHONEXE=$1
19 PYTHONEXE=$1
20 shift
20 shift
21 ;;
21 ;;
22 --withpython | --with-python)
22 --withpython | --with-python)
23 shift
23 shift
24 PYTHONVER=2.7.16
24 PYTHONVER=2.7.16
25 PYTHONMD5=f1a2ace631068444831d01485466ece0
25 PYTHONMD5=f1a2ace631068444831d01485466ece0
26 PYTHONEXE=python
26 PYTHONEXE=python
27 ;;
27 ;;
28 --rpmbuilddir )
28 --rpmbuilddir )
29 shift
29 shift
30 RPMBUILDDIR="$1"
30 RPMBUILDDIR="$1"
31 shift
31 shift
32 ;;
32 ;;
33 * )
33 * )
34 echo "Invalid parameter $1!" 1>&2
34 echo "Invalid parameter $1!" 1>&2
35 exit 1
35 exit 1
36 ;;
36 ;;
37 esac
37 esac
38 done
38 done
39
39
40 cd "`dirname $0`/../.."
40 cd "`dirname $0`/../.."
41
41
42 specfile=$PWD/contrib/packaging/mercurial.spec
42 specfile=$PWD/contrib/packaging/mercurial.spec
43 if [ ! -f $specfile ]; then
43 if [ ! -f $specfile ]; then
44 echo "Cannot find $specfile!" 1>&2
44 echo "Cannot find $specfile!" 1>&2
45 exit 1
45 exit 1
46 fi
46 fi
47
47
48 if [ ! -d .hg ]; then
48 if [ ! -d .hg ]; then
49 echo 'You are not inside a Mercurial repository!' 1>&2
49 echo 'You are not inside a Mercurial repository!' 1>&2
50 exit 1
50 exit 1
51 fi
51 fi
52
52
53 gethgversion
53 gethgversion
54
54
55 if [ -z "$type" ] ; then
55 if [ -z "$type" ] ; then
56 release=1
56 release=1
57 else
57 else
58 release=0.9_$type
58 release=0.9_$type
59 fi
59 fi
60
60
61 if [ -n "$distance" ] ; then
61 if [ -n "$distance" ] ; then
62 release=$release+${distance}_${node}
62 release=$release+${distance}_${node}
63 fi
63 fi
64
64
65 if [ "$PYTHONVER" ]; then
65 if [ "$PYTHONVER" ]; then
66 release=$release+$PYTHONVER
66 release=$release+$PYTHONVER
67 RPMPYTHONVER=$PYTHONVER
67 RPMPYTHONVER=$PYTHONVER
68 else
68 else
69 RPMPYTHONVER=%{nil}
69 RPMPYTHONVER=%{nil}
70 fi
70 fi
71
71
72 mkdir -p $RPMBUILDDIR/{SOURCES,BUILD,SRPMS,RPMS}
72 mkdir -p $RPMBUILDDIR/{SOURCES,BUILD,SRPMS,RPMS}
73 $HG archive -t tgz $RPMBUILDDIR/SOURCES/mercurial-$version-$release.tar.gz
73 $HG archive -t tgz $RPMBUILDDIR/SOURCES/mercurial-$version-$release.tar.gz
74 if [ "$PYTHONVER" ]; then
74 if [ "$PYTHONVER" ]; then
75 (
75 (
76 mkdir -p build
76 mkdir -p build
77 cd build
77 cd build
78 PYTHON_SRCFILE=Python-$PYTHONVER.tgz
78 PYTHON_SRCFILE=Python-$PYTHONVER.tgz
79 [ -f $PYTHON_SRCFILE ] || curl -Lo $PYTHON_SRCFILE http://www.python.org/ftp/python/$PYTHONVER/$PYTHON_SRCFILE
79 [ -f $PYTHON_SRCFILE ] || curl -Lo $PYTHON_SRCFILE http://www.python.org/ftp/python/$PYTHONVER/$PYTHON_SRCFILE
80 if [ "$PYTHONMD5" ]; then
80 if [ "$PYTHONMD5" ]; then
81 echo "$PYTHONMD5 $PYTHON_SRCFILE" | md5sum -w -c
81 echo "$PYTHONMD5 $PYTHON_SRCFILE" | md5sum -w -c
82 fi
82 fi
83 ln -f $PYTHON_SRCFILE $RPMBUILDDIR/SOURCES/$PYTHON_SRCFILE
83 ln -f $PYTHON_SRCFILE $RPMBUILDDIR/SOURCES/$PYTHON_SRCFILE
84
84
85 DOCUTILSVER=`sed -ne "s/^%global docutilsname docutils-//p" $specfile`
85 DOCUTILSVER=`sed -ne "s/^%global docutilsname docutils-//p" $specfile`
86 DOCUTILS_SRCFILE=docutils-$DOCUTILSVER.tar.gz
86 DOCUTILS_SRCFILE=docutils-$DOCUTILSVER.tar.gz
87 [ -f $DOCUTILS_SRCFILE ] || curl -Lo $DOCUTILS_SRCFILE http://downloads.sourceforge.net/project/docutils/docutils/$DOCUTILSVER/$DOCUTILS_SRCFILE
87 [ -f $DOCUTILS_SRCFILE ] || curl -Lo $DOCUTILS_SRCFILE http://downloads.sourceforge.net/project/docutils/docutils/$DOCUTILSVER/$DOCUTILS_SRCFILE
88 DOCUTILSMD5=`sed -ne "s/^%global docutilsmd5 //p" $specfile`
88 DOCUTILSMD5=`sed -ne "s/^%global docutilsmd5 //p" $specfile`
89 if [ "$DOCUTILSMD5" ]; then
89 if [ "$DOCUTILSMD5" ]; then
90 echo "$DOCUTILSMD5 $DOCUTILS_SRCFILE" | md5sum -w -c
90 echo "$DOCUTILSMD5 $DOCUTILS_SRCFILE" | md5sum -w -c
91 fi
91 fi
92 ln -f $DOCUTILS_SRCFILE $RPMBUILDDIR/SOURCES/$DOCUTILS_SRCFILE
92 ln -f $DOCUTILS_SRCFILE $RPMBUILDDIR/SOURCES/$DOCUTILS_SRCFILE
93 )
93 )
94 fi
94 fi
95
95
96 mkdir -p $RPMBUILDDIR/SPECS
96 mkdir -p $RPMBUILDDIR/SPECS
97 rpmspec=$RPMBUILDDIR/SPECS/mercurial.spec
97 rpmspec=$RPMBUILDDIR/SPECS/mercurial.spec
98
98
99 sed -e "s,^Version:.*,Version: $version," \
99 sed -e "s,^Version:.*,Version: $version," \
100 -e "s,^Release:.*,Release: $release," \
100 -e "s,^Release:.*,Release: $release," \
101 -e "s/^%global pythonexe .*/%global pythonexe $PYTHONEXE/" \
101 -e "s/^%global pythonexe .*/%global pythonexe $PYTHONEXE/" \
102 $specfile > $rpmspec
102 $specfile > $rpmspec
103
103
104 echo >> $rpmspec
104 echo >> $rpmspec
105 echo "%changelog" >> $rpmspec
105 echo "%changelog" >> $rpmspec
106
106
107 if echo $version | grep '+' > /dev/null 2>&1; then
107 if echo $version | grep '+' > /dev/null 2>&1; then
108 latesttag="`echo $version | sed -e 's/+.*//'`"
108 latesttag="`echo $version | sed -e 's/+.*//'`"
109 $HG log -r .:"$latesttag" -fM \
109 $HG log -r .:"$latesttag" -fM \
110 --template '{date|hgdate}\t{author}\t{desc|firstline}\n' | python -c '
110 --template '{date|hgdate}\t{author}\t{desc|firstline}\n' | python -c '
111 import sys, time
111 import sys, time
112
112
113 def datestr(date, format):
113 def datestr(date, format):
114 return time.strftime(format, time.gmtime(float(date[0]) - date[1]))
114 return time.strftime(format, time.gmtime(float(date[0]) - date[1]))
115
115
116 changelog = []
116 changelog = []
117 for l in sys.stdin.readlines():
117 for l in sys.stdin.readlines():
118 tok = l.split("\t")
118 tok = l.split("\t")
119 hgdate = tuple(int(v) for v in tok[0].split())
119 hgdate = tuple(int(v) for v in tok[0].split())
120 changelog.append((datestr(hgdate, "%F"), tok[1], hgdate, tok[2]))
120 changelog.append((datestr(hgdate, "%F"), tok[1], hgdate, tok[2]))
121 prevtitle = ""
121 prevtitle = ""
122 for l in sorted(changelog, reverse=True):
122 for l in sorted(changelog, reverse=True):
123 title = "* %s %s" % (datestr(l[2], "%a %b %d %Y"), l[1])
123 title = "* %s %s" % (datestr(l[2], "%a %b %d %Y"), l[1])
124 if prevtitle != title:
124 if prevtitle != title:
125 prevtitle = title
125 prevtitle = title
126 print
126 print
127 print(title)
127 print(title)
128 print("- %s" % l[3].strip())
128 print("- %s" % l[3].strip())
129 ' >> $rpmspec
129 ' >> $rpmspec
130
130
131 else
131 else
132
132
133 $HG log \
133 $HG log \
134 --template '{date|hgdate}\t{author}\t{desc|firstline}\n' \
134 --template '{date|hgdate}\t{author}\t{desc|firstline}\n' \
135 .hgtags | python -c '
135 .hgtags | python -c '
136 import sys, time
136 import sys, time
137
137
138 def datestr(date, format):
138 def datestr(date, format):
139 return time.strftime(format, time.gmtime(float(date[0]) - date[1]))
139 return time.strftime(format, time.gmtime(float(date[0]) - date[1]))
140
140
141 for l in sys.stdin.readlines():
141 for l in sys.stdin.readlines():
142 tok = l.split("\t")
142 tok = l.split("\t")
143 hgdate = tuple(int(v) for v in tok[0].split())
143 hgdate = tuple(int(v) for v in tok[0].split())
144 print("* %s %s\n- %s" % (datestr(hgdate, "%a %b %d %Y"), tok[1], tok[2]))
144 print("* %s %s\n- %s" % (datestr(hgdate, "%a %b %d %Y"), tok[1], tok[2]))
145 ' >> $rpmspec
145 ' >> $rpmspec
146
146
147 fi
147 fi
148
148
149 sed -i \
149 sed -i \
150 -e "s/^%define withpython.*$/%define withpython $RPMPYTHONVER/" \
150 -e "s/^%define withpython.*$/%define withpython $RPMPYTHONVER/" \
151 $rpmspec
151 $rpmspec
152
152
153 if [ "$BUILD" ]; then
153 if [ "$BUILD" ]; then
154 rpmbuild --define "_topdir $RPMBUILDDIR" -ba $rpmspec --clean
154 rpmbuild --define "_topdir $RPMBUILDDIR" -ba $rpmspec --clean
155 if [ $? = 0 ]; then
155 if [ $? = 0 ]; then
156 echo
156 echo
157 echo "Built packages for $version-$release:"
157 echo "Built packages for $version-$release:"
158 find $RPMBUILDDIR/*RPMS/ -type f -newer $rpmspec
158 find $RPMBUILDDIR/*RPMS/ -type f -newer $rpmspec
159 fi
159 fi
160 else
160 else
161 echo "Prepared sources for $version-$release $rpmspec are in $RPMBUILDDIR/SOURCES/ - use like:"
161 echo "Prepared sources for $version-$release $rpmspec are in $RPMBUILDDIR/SOURCES/ - use like:"
162 echo "rpmbuild --define '_topdir $RPMBUILDDIR' -ba $rpmspec --clean"
162 echo "rpmbuild --define '_topdir $RPMBUILDDIR' -ba $rpmspec --clean"
163 fi
163 fi
@@ -1,15 +1,15 b''
1 FROM fedora:29
1 FROM fedora:29
2
2
3 RUN groupadd -g 1000 build && \
3 RUN groupadd -g 1000 build && \
4 useradd -u 1000 -g 1000 -s /bin/bash -d /build -m build
4 useradd -u 1000 -g 1000 -s /bin/bash -d /build -m build
5
5
6 RUN dnf install -y \
6 RUN dnf install -y \
7 gcc \
7 gcc \
8 gettext \
8 gettext \
9 make \
9 make \
10 python-devel \
10 python3-devel \
11 python-docutils \
11 python3-docutils \
12 rpm-build
12 rpm-build
13
13
14 # For creating repo meta data
14 # For creating repo meta data
15 RUN dnf install -y createrepo
15 RUN dnf install -y createrepo
@@ -1,172 +1,172 b''
1 %global emacs_lispdir %{_datadir}/emacs/site-lisp
1 %global emacs_lispdir %{_datadir}/emacs/site-lisp
2
2
3 %define withpython %{nil}
3 %define withpython %{nil}
4
4
5 %global pythonexe python2
5 %global pythonexe python3
6
6
7 %if "%{?withpython}"
7 %if "%{?withpython}"
8
8
9 %global pythonver %{withpython}
9 %global pythonver %{withpython}
10 %global pythonname Python-%{withpython}
10 %global pythonname Python-%{withpython}
11 %global docutilsname docutils-0.14
11 %global docutilsname docutils-0.14
12 %global docutilsmd5 c53768d63db3873b7d452833553469de
12 %global docutilsmd5 c53768d63db3873b7d452833553469de
13 %global pythonhg python-hg
13 %global pythonhg python-hg
14 %global hgpyprefix /opt/%{pythonhg}
14 %global hgpyprefix /opt/%{pythonhg}
15 # byte compilation will fail on some some Python /test/ files
15 # byte compilation will fail on some some Python /test/ files
16 %global _python_bytecompile_errors_terminate_build 0
16 %global _python_bytecompile_errors_terminate_build 0
17
17
18 %else
18 %else
19
19
20 %global pythonver %(%{pythonexe} -c 'import sys;print(".".join(map(str, sys.version_info[:2])))')
20 %global pythonver %(%{pythonexe} -c 'import sys;print(".".join(map(str, sys.version_info[:2])))')
21
21
22 %endif
22 %endif
23
23
24 Summary: A fast, lightweight Source Control Management system
24 Summary: A fast, lightweight Source Control Management system
25 Name: mercurial
25 Name: mercurial
26 Version: snapshot
26 Version: snapshot
27 Release: 0
27 Release: 0
28 License: GPLv2+
28 License: GPLv2+
29 Group: Development/Tools
29 Group: Development/Tools
30 URL: https://mercurial-scm.org/
30 URL: https://mercurial-scm.org/
31 Source0: %{name}-%{version}-%{release}.tar.gz
31 Source0: %{name}-%{version}-%{release}.tar.gz
32 %if "%{?withpython}"
32 %if "%{?withpython}"
33 Source1: %{pythonname}.tgz
33 Source1: %{pythonname}.tgz
34 Source2: %{docutilsname}.tar.gz
34 Source2: %{docutilsname}.tar.gz
35 %endif
35 %endif
36 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
36 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
37
37
38 BuildRequires: make, gcc, gettext
38 BuildRequires: make, gcc, gettext
39 %if "%{?withpython}"
39 %if "%{?withpython}"
40 BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel
40 BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel
41 %else
41 %else
42 BuildRequires: python >= %{pythonver}, python-devel, python-docutils >= 0.5
42 BuildRequires: %{pythonexe} >= %{pythonver}, %{pythonexe}-devel, %{pythonexe}-docutils >= 0.5
43 Requires: python >= %{pythonver}
43 Requires: %{pythonexe} >= %{pythonver}
44 %endif
44 %endif
45 # The hgk extension uses the wish tcl interpreter, but we don't enforce it
45 # The hgk extension uses the wish tcl interpreter, but we don't enforce it
46 #Requires: tk
46 #Requires: tk
47
47
48 %description
48 %description
49 Mercurial is a fast, lightweight source control management system designed
49 Mercurial is a fast, lightweight source control management system designed
50 for efficient handling of very large distributed projects.
50 for efficient handling of very large distributed projects.
51
51
52 %prep
52 %prep
53
53
54 %if "%{?withpython}"
54 %if "%{?withpython}"
55 %setup -q -n mercurial-%{version}-%{release} -a1 -a2
55 %setup -q -n mercurial-%{version}-%{release} -a1 -a2
56 # despite the comments in cgi.py, we do this to prevent rpmdeps from picking /usr/local/bin/python up
56 # despite the comments in cgi.py, we do this to prevent rpmdeps from picking /usr/local/bin/python up
57 sed -i '1c#! /usr/bin/env %{pythonexe}' %{pythonname}/Lib/cgi.py
57 sed -i '1c#! /usr/bin/env %{pythonexe}' %{pythonname}/Lib/cgi.py
58 %else
58 %else
59 %setup -q -n mercurial-%{version}-%{release}
59 %setup -q -n mercurial-%{version}-%{release}
60 %endif
60 %endif
61
61
62 %build
62 %build
63
63
64 export HGPYTHON3=1
64 export HGPYTHON3=1
65
65
66 %if "%{?withpython}"
66 %if "%{?withpython}"
67
67
68 PYPATH=$PWD/%{pythonname}
68 PYPATH=$PWD/%{pythonname}
69 cd $PYPATH
69 cd $PYPATH
70 ./configure --prefix=%{hgpyprefix}
70 ./configure --prefix=%{hgpyprefix}
71 make all %{?_smp_mflags}
71 make all %{?_smp_mflags}
72 cd -
72 cd -
73
73
74 cd %{docutilsname}
74 cd %{docutilsname}
75 LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py build
75 LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py build
76 cd -
76 cd -
77
77
78 # verify Python environment
78 # verify Python environment
79 LD_LIBRARY_PATH=$PYPATH PYTHONPATH=$PWD/%{docutilsname} $PYPATH/python -c 'import sys, zlib, bz2, ssl, curses, readline'
79 LD_LIBRARY_PATH=$PYPATH PYTHONPATH=$PWD/%{docutilsname} $PYPATH/python -c 'import sys, zlib, bz2, ssl, curses, readline'
80
80
81 # set environment for make
81 # set environment for make
82 export PATH=$PYPATH:$PATH
82 export PATH=$PYPATH:$PATH
83 export LD_LIBRARY_PATH=$PYPATH
83 export LD_LIBRARY_PATH=$PYPATH
84 export CFLAGS="-L $PYPATH"
84 export CFLAGS="-L $PYPATH"
85 export PYTHONPATH=$PWD/%{docutilsname}
85 export PYTHONPATH=$PWD/%{docutilsname}
86
86
87 %endif
87 %endif
88
88
89 make all PYTHON=%{pythonexe}
89 make all PYTHON=%{pythonexe}
90 make -C contrib/chg
90 make -C contrib/chg
91
91
92 sed -i -e '1s|#!/usr/bin/env python$|#!/usr/bin/env %{pythonexe}|' contrib/hg-ssh
92 sed -i -e '1s|#!/usr/bin/env python$|#!/usr/bin/env %{pythonexe}|' contrib/hg-ssh
93
93
94 %install
94 %install
95 rm -rf $RPM_BUILD_ROOT
95 rm -rf $RPM_BUILD_ROOT
96
96
97 export HGPYTHON3=1
97 export HGPYTHON3=1
98
98
99 %if "%{?withpython}"
99 %if "%{?withpython}"
100
100
101 PYPATH=$PWD/%{pythonname}
101 PYPATH=$PWD/%{pythonname}
102 cd $PYPATH
102 cd $PYPATH
103 make install DESTDIR=$RPM_BUILD_ROOT
103 make install DESTDIR=$RPM_BUILD_ROOT
104 # these .a are not necessary and they are readonly and strip fails - kill them!
104 # these .a are not necessary and they are readonly and strip fails - kill them!
105 rm -f %{buildroot}%{hgpyprefix}/lib/{,python2.*/config}/libpython2.*.a
105 rm -f %{buildroot}%{hgpyprefix}/lib/{,python2.*/config}/libpython2.*.a
106 cd -
106 cd -
107
107
108 cd %{docutilsname}
108 cd %{docutilsname}
109 LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py install --root="$RPM_BUILD_ROOT"
109 LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py install --root="$RPM_BUILD_ROOT"
110 cd -
110 cd -
111
111
112 PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir}
112 PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir}
113 mkdir -p $RPM_BUILD_ROOT%{_bindir}
113 mkdir -p $RPM_BUILD_ROOT%{_bindir}
114 ( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/hg . )
114 ( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/hg . )
115 ( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/python2.? %{pythonhg} )
115 ( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/python2.? %{pythonhg} )
116
116
117 %else
117 %else
118
118
119 make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir}
119 make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir}
120
120
121 %endif
121 %endif
122
122
123 install -m 755 contrib/chg/chg $RPM_BUILD_ROOT%{_bindir}/
123 install -m 755 contrib/chg/chg $RPM_BUILD_ROOT%{_bindir}/
124 install -m 755 contrib/hgk $RPM_BUILD_ROOT%{_bindir}/
124 install -m 755 contrib/hgk $RPM_BUILD_ROOT%{_bindir}/
125 install -m 755 contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir}/
125 install -m 755 contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir}/
126
126
127 bash_completion_dir=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
127 bash_completion_dir=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
128 mkdir -p $bash_completion_dir
128 mkdir -p $bash_completion_dir
129 install -m 644 contrib/bash_completion $bash_completion_dir/mercurial.sh
129 install -m 644 contrib/bash_completion $bash_completion_dir/mercurial.sh
130
130
131 zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
131 zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
132 mkdir -p $zsh_completion_dir
132 mkdir -p $zsh_completion_dir
133 install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial
133 install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial
134
134
135 mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
135 mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
136 install -m 644 contrib/mercurial.el $RPM_BUILD_ROOT%{emacs_lispdir}/
136 install -m 644 contrib/mercurial.el $RPM_BUILD_ROOT%{emacs_lispdir}/
137 install -m 644 contrib/mq.el $RPM_BUILD_ROOT%{emacs_lispdir}/
137 install -m 644 contrib/mq.el $RPM_BUILD_ROOT%{emacs_lispdir}/
138
138
139 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
139 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
140
140
141 %clean
141 %clean
142 rm -rf $RPM_BUILD_ROOT
142 rm -rf $RPM_BUILD_ROOT
143
143
144 %files
144 %files
145 %defattr(-,root,root,-)
145 %defattr(-,root,root,-)
146 %doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi contrib/*.wsgi
146 %doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi contrib/*.wsgi
147 %doc %attr(644,root,root) %{_mandir}/man?/hg*
147 %doc %attr(644,root,root) %{_mandir}/man?/hg*
148 %doc %attr(644,root,root) contrib/*.svg
148 %doc %attr(644,root,root) contrib/*.svg
149 %dir %{_datadir}/zsh/
149 %dir %{_datadir}/zsh/
150 %dir %{_datadir}/zsh/site-functions/
150 %dir %{_datadir}/zsh/site-functions/
151 %{_datadir}/zsh/site-functions/_mercurial
151 %{_datadir}/zsh/site-functions/_mercurial
152 %dir %{_datadir}/emacs/site-lisp/
152 %dir %{_datadir}/emacs/site-lisp/
153 %{_datadir}/emacs/site-lisp/mercurial.el
153 %{_datadir}/emacs/site-lisp/mercurial.el
154 %{_datadir}/emacs/site-lisp/mq.el
154 %{_datadir}/emacs/site-lisp/mq.el
155 %{_bindir}/hg
155 %{_bindir}/hg
156 %{_bindir}/chg
156 %{_bindir}/chg
157 %{_bindir}/hgk
157 %{_bindir}/hgk
158 %{_bindir}/hg-ssh
158 %{_bindir}/hg-ssh
159 %dir %{_sysconfdir}/bash_completion.d/
159 %dir %{_sysconfdir}/bash_completion.d/
160 %config(noreplace) %{_sysconfdir}/bash_completion.d/mercurial.sh
160 %config(noreplace) %{_sysconfdir}/bash_completion.d/mercurial.sh
161 %dir %{_sysconfdir}/mercurial
161 %dir %{_sysconfdir}/mercurial
162 %dir %{_sysconfdir}/mercurial/hgrc.d
162 %dir %{_sysconfdir}/mercurial/hgrc.d
163 %if "%{?withpython}"
163 %if "%{?withpython}"
164 %{_bindir}/%{pythonhg}
164 %{_bindir}/%{pythonhg}
165 %{hgpyprefix}
165 %{hgpyprefix}
166 %else
166 %else
167 %{_libdir}/python%{pythonver}/site-packages/%{name}-*-py%{pythonver}.egg-info
167 %{_libdir}/python%{pythonver}/site-packages/%{name}-*-py%{pythonver}.egg-info
168 %{_libdir}/python%{pythonver}/site-packages/%{name}
168 %{_libdir}/python%{pythonver}/site-packages/%{name}
169 %{_libdir}/python%{pythonver}/site-packages/hgext
169 %{_libdir}/python%{pythonver}/site-packages/hgext
170 %{_libdir}/python%{pythonver}/site-packages/hgext3rd
170 %{_libdir}/python%{pythonver}/site-packages/hgext3rd
171 %{_libdir}/python%{pythonver}/site-packages/hgdemandimport
171 %{_libdir}/python%{pythonver}/site-packages/hgdemandimport
172 %endif
172 %endif
General Comments 0
You need to be logged in to leave comments. Login now