comparison contrib/mercurial.spec @ 563:42a6a41ab76b

[PATCH] clean up RPM spec file -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] clean up RPM spec file From: Bryan O'Sullivan <bos@serpentine.com> The current RPM spec file makes it impossible to split Mercurial into multiple interdependent packages. Here's a patch that fixes that problem. manifest hash: 4acc4c5cf4485d92a32d2259b83314b7167dece3 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxb2+ywK+sNU5EO8RAnrTAJ4tkAh6xnHvRHMxzrfqKb/SXYS2wwCeMfK1 PAr+1FFoSqUmA9rt8Yaw6f4= =MaPn -----END PGP SIGNATURE-----
author mpm@selenic.com
date Fri, 01 Jul 2005 14:03:42 -0800
parents 7c1952b29656
children ab22af71386f
comparison
equal deleted inserted replaced
562:be6233a2bfdd 563:42a6a41ab76b
7 Distribution: RedHat 7 Distribution: RedHat
8 Source: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz 8 Source: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz
9 Packager: Arun Sharma <arun@sharma-home.net> 9 Packager: Arun Sharma <arun@sharma-home.net>
10 Prefix: /usr 10 Prefix: /usr
11 BuildRoot: /tmp/build.%{name}-%{version}-%{release} 11 BuildRoot: /tmp/build.%{name}-%{version}-%{release}
12
13 %define pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))')
14 %define pythonlib %{_libdir}/python%{pythonver}/site-packages/%{name}
12 15
13 %description 16 %description
14 17
15 Mercurial is a fast, lightweight source control management system designed 18 Mercurial is a fast, lightweight source control management system designed
16 for efficient handling of very large distributed projects. 19 for efficient handling of very large distributed projects.
27 30
28 %install 31 %install
29 32
30 python setup.py install --root $RPM_BUILD_ROOT 33 python setup.py install --root $RPM_BUILD_ROOT
31 34
32 cd $RPM_BUILD_ROOT 35 %clean
33 find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \ 36 rm -rf $RPM_BUILD_ROOT
34 $RPM_BUILD_DIR/file.list.%{name}
35 37
36 find . -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \ 38 %files
37 -e '/\/config\//s|^|%config|' \ 39 %defattr(-,root,root,-)
38 -e '/\/applnk\//s|^|%config|' >> \
39 $RPM_BUILD_DIR/file.list.%{name}
40
41 find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
42 $RPM_BUILD_DIR/file.list.%{name}
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{name}
46
47 %files -f ../file.list.%{name}
48 %doc doc 40 %doc doc
41 %dir %{pythonlib}
42 %{_bindir}/hgmerge
43 %{_bindir}/hg
44 %{pythonlib}/templates
45 %{pythonlib}/*.pyc
46 %{pythonlib}/*.py
47 %{pythonlib}/*.so