OK. This is what the .spec file of cvs.spec looks like
after applying Chmouel's script + restoring the changelog
section.

Is this the way it's supposed to be? Or should we also make
/etc look like %{_sysconfdir} ?

These are the macro's from /usr/lib/rpm/macro's that we're
talking about, right?

# ---- configure macros.
#       Macro(s) slavishly copied from autoconf's config.status.
#
%_prefix                /usr
%_exec_prefix           %{_prefix}
%_bindir                %{_exec_prefix}/bin
%_sbindir               %{_exec_prefix}/sbin
%_libexecdir            %{_exec_prefix}/libexec
%_datadir               %{_prefix}/share
%_sysconfdir            /etc
%_sharedstatedir        %{_prefix}/com
%_localstatedir         %{_prefix}/var
%_lib                   lib
%_libdir                %{_exec_prefix}/%{_lib}
%_includedir            %{_prefix}/include
%_oldincludedir         /usr/include
%_infodir               %{_prefix}/info
%_mandir                %{_prefix}/man
Summary: A version control system.
Summary(fr): Un système pour maintenir à jour des fichiers.
Name: cvs
Version: 1.10.8
Release: 2mdk
Copyright: GPL
Group: Development/Other
Source: ftp://download.cyclic.com/pub/cvs-%{version}/cvs-%{version}.tar.bz2
Source1: cvspserver
Source2: cvs.conf
Patch0: cvs-1.10-tmprace.patch.bz2
Patch1: cvs-1.10.7-mmap.patch.bz2
Prereq: /sbin/install-info
Prefix: %{_prefix}
Buildroot: /var/tmp/%{name}-root
PreReq: /sbin/install-info

%description
CVS means Concurrent Version System; it is a version control
system which can record the history of your files (usually,
but not always, source code). CVS only stores the differences
between versions, instead of every version of every file
you've ever created. CVS also keeps a log of who, when and
why changes occurred, among other aspects.

CVS is very helpful for managing releases and controlling
the concurrent editing of source files among multiple
authors. Instead of providing version control for a
collection of files in a single directory, CVS provides
version control for a hierarchical collection of
directories consisting of revision controlled files.

These directories and files can then be combined together
to form a software release.

Install the cvs package if you need to use a version
control system.

%description -l fr
"CVS" signifie "Concurrent Version System". C'est un système de comparaison
de versions de fichiers, qui peut garder une trace des changements apportés
à des fichiers (le plus souvent, les fichiers des sources d'un programme).
CVS conserve seulement les différences, et non l'intégralité d'un fichier
récent et d'un fichier plus ancien. A chaque modification d'un fichier, CVS
garde (entre autres) le nom de la personne ayant fait la modification, la
raison justifiant cette modification, et la date à laquelle celle-ci a eu
lieu.

CVS est très utile pour gérer la mise en commun des modifications apportées
par plusieurs personnes travaillant en parallèle sur les mêmes fichiers. Au
lieu de garder plusieurs versions des fichiers dans un seul répertoire, CVS
crée une série de répertoires, chacun contenant une nouvelle version des
fichiers. Ces répertoires et ces fichiers peuvent ensuite être regroupés
pour former la version la plus à jour du logiciel.

Installez ce package si vous avez besoin d'utiliser un système de contrôle
de version.

Vous pouvez également utiliser rcs en lieu et place de cvs.

%prep
%setup -q
%patch0 -p1 -b .tmprace
#%patch1 -p0 -b .mmap

%build

%configure

make

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall install-info

mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/etc/cvs
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/cvs

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/install-info %{_infodir}/cvs.info.bz2 %{_infodir}/dir --entry="* cvs: (cvs).     
     A version control system for multiple developers."
/sbin/install-info %{_infodir}/cvsclient.info.bz2 %{_infodir}/dir --entry="* 
cvsclient: (cvsclient).                       The CVS client/server protocol."

%preun
if [ $1 = 0 ]; then
        /sbin/install-info --delete %{_infodir}/cvs.info.bz2 %{_infodir}/dir 
--entry="* cvs: (cvs).             A version control system for multiple developers."
        /sbin/install-info --delete %{_infodir}/cvsclient.info.bz2 %{_infodir}/dir 
--entry="* cvsclient: (cvsclient).                       The CVS cliennt/server 
protocol."
fi

%files
%defattr(-,root,root)
%doc BUGS FAQ MINOR-BUGS NEWS PROJECTS TODO README
%doc doc/*.ps
%{_bindir}/cvs
%{_bindir}/cvsbug
%{_bindir}/rcs2log
%{_mandir}/man1/cvs.1*
%{_mandir}/man5/cvs.5*
%{_mandir}/man8/cvsbug.8*
%{_infodir}/cvs*
%{_libdir}/cvs
%{_sbindir}/cvspserver
%config(noreplace) /etc/cvs/cvs.conf

%changelog
* Sun Jul 09 2000 Stefan van der Eijk <[EMAIL PROTECTED]> 1.10.8-2mdk
- fixed makeinstall problem
- macroized

* Tue Mar 28 2000 Frederic Lepied <[EMAIL PROTECTED]> 1.10.8-1mdk
- 1.10.8
- created /usr/sbin/cvspserver to launch cvs pserver according to
/etc/cvs/cvs.conf.

* Fri Mar 24 2000 Frederic Lepied <[EMAIL PROTECTED]> 1.10.7-5mdk
- group fix.

* Thu Nov 11 1999 Jeff Garzik <[EMAIL PROTECTED]>
- ...but keep experimental mmap patch in cooker

* Thu Nov 11 1999 Jeff Garzik <[EMAIL PROTECTED]>
- Build release, without experimental mmap patch

* Mon Oct 11 1999 Chmouel Boudjnah <[EMAIL PROTECTED]>

- Add patch from Jeff <[EMAIL PROTECTED]> :
        src/client.c, src/import.c, src/filesubr.c, src/logmsg.c, src/server.c:
        * mmap support for local file read
        configure.in:
        * AC_PROG_CC handles AC_C_CROSS in modern autoconf, remove it
        * check for mmap()
        src/add.c, src/buffer.c, src/lock.c, src/modules.c, src/rcs.c,
        src/update.c, src/server.c:
        * zero variable to avoid [common, but sometimes spurious] compiler
        warning about an uninitialized variable
        src/client.c:
        * remove BROKEN_READWRITE_CONVERSION, dead feature.  The code used
        fread() to read file data not fgets(), so linefeeds were never
        translated anyway.
        src/cvs.h:
        * conditionally include sys/mman.h for mmap
        src/filesubr.c:
        * mmap support for local file read
        * optimize compare case where file sizes differ (do not open files at
        all)
        src/server.c:
        * update read_and_gzip() call
        src/server.h:
        * update read_and_gzip() prototype
        src/zlib.c:
        * update read_and_gzip() to optionally support reading from an input
        buffer instead of a file
        zlib/*.c:
        * const-ify input data pointer.  smart compilers can use this to further
        optimize
        

* Mon Aug 16 1999 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- 1.10.7

* Tue Jul 20 1999 Thierry Vignaud <[EMAIL PROTECTED]>
- add french description from Gregus <[EMAIL PROTECTED]>

* Tue Jul 20 1999 Chmouel Boudjnah <[EMAIL PROTECTED]>

- Merging with Redhat :
        * Wed Jul 14 1999 Jim Kingdon <http://developer.redhat.com>
        - add the patch to make 1.10.6 usable
        (http://www.cyclic.com/cvs/dev-known.html).
        

* Wed May 19 1999 Bernhard Rosenkränzer <[EMAIL PROTECTED]>
- Fix several .spec bugs
- Update to 1.10.6

* Tue May 18 1999 Chmouel Boudjnah <[EMAIL PROTECTED]>
- Bzipped info files.

* Tue May 11 1999 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- Mandrake adaptations

* Sun Mar 21 1999 Cristian Gafton <[EMAIL PROTECTED]> 
- auto rebuild in the new build environment (release 2)

* Mon Feb 22 1999 Jeff Johnson <[EMAIL PROTECTED]>
- updated text in spec file.

* Mon Feb 22 1999 Jeff Johnson <[EMAIL PROTECTED]>
- update to 1.10.5.

* Tue Feb  2 1999 Jeff Johnson <[EMAIL PROTECTED]>
- update to 1.10.4.

* Tue Oct 20 1998 Jeff Johnson <[EMAIL PROTECTED]>
- update to 1.10.3.

* Mon Sep 28 1998 Jeff Johnson <[EMAIL PROTECTED]>
- update to 1.10.2.

* Wed Sep 23 1998 Jeff Johnson <[EMAIL PROTECTED]>
- remove trailing characters from rcs2log mktemp args

* Thu Sep 10 1998 Jeff Johnson <[EMAIL PROTECTED]>
- update to 1.10.1

* Mon Aug 31 1998 Jeff Johnson <[EMAIL PROTECTED]>
- fix race conditions in cvsbug/rcs2log

* Sun Aug 16 1998 Jeff Johnson <[EMAIL PROTECTED]>
- update to 1.10.

* Wed Aug 12 1998 Jeff Johnson <[EMAIL PROTECTED]>
- update to 1.9.30.

* Mon Jun 08 1998 Prospector System <[EMAIL PROTECTED]>
- translations modified for de, fr

* Mon Jun  8 1998 Jeff Johnson <[EMAIL PROTECTED]>
- build root
- update to 1.9.28

* Mon Apr 27 1998 Prospector System <[EMAIL PROTECTED]>
- translations modified for de, fr, tr

* Wed Oct 29 1997 Otto Hammersmith <[EMAIL PROTECTED]>
- added install-info stuff
- added changelog section
--- cvs.spec.orig       Sat Jul  8 21:07:02 2000
+++ cvs.spec    Sun Jul  9 15:07:27 2000
@@ -2,7 +2,7 @@
 Summary(fr): Un système pour maintenir à jour des fichiers.
 Name: cvs
 Version: 1.10.8
-Release: 1mdk
+Release: 2mdk
 Copyright: GPL
 Group: Development/Other
 Source: ftp://download.cyclic.com/pub/cvs-%{version}/cvs-%{version}.tar.bz2
@@ -72,10 +72,10 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 
-make prefix=$RPM_BUILD_ROOT/%{prefix} install install-info
+%makeinstall install-info
 
-mkdir -p $RPM_BUILD_ROOT%{prefix}/sbin
-install %{SOURCE1} $RPM_BUILD_ROOT%{prefix}/sbin
+mkdir -p $RPM_BUILD_ROOT%{_sbindir}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}
 mkdir -p $RPM_BUILD_ROOT/etc/cvs
 install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/cvs
 
@@ -83,31 +83,35 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-/sbin/install-info %{prefix}/info/cvs.info.bz2 /%{prefix}/info/dir --entry="* cvs: 
(cvs).          A version control system for multiple developers."
-/sbin/install-info %{prefix}/info/cvsclient.info.bz2 /%{prefix}/info/dir --entry="* 
cvsclient: (cvsclient).                       The CVS client/server protocol."
+/sbin/install-info %{_infodir}/cvs.info.bz2 %{_infodir}/dir --entry="* cvs: (cvs).    
+      A version control system for multiple developers."
+/sbin/install-info %{_infodir}/cvsclient.info.bz2 %{_infodir}/dir --entry="* 
+cvsclient: (cvsclient).                       The CVS client/server protocol."
 
 %preun
 if [ $1 = 0 ]; then
-       /sbin/install-info --delete %{prefix}/info/cvs.info.bz2 /%{prefix}/info/dir 
--entry="* cvs: (cvs).              A version control system for multiple developpers."
-       /sbin/install-info --delete %{prefix}/info/cvsclient.info.bz2 
/%{prefix}/info/dir --entry="* cvsclient: (cvsclient).                       The CVVS 
client/server protocol."
+       /sbin/install-info --delete %{_infodir}/cvs.info.bz2 %{_infodir}/dir 
+--entry="* cvs: (cvs).             A version control system for multiple developers."
+       /sbin/install-info --delete %{_infodir}/cvsclient.info.bz2 %{_infodir}/dir 
+--entry="* cvsclient: (cvsclient).                       The CVS cliennt/server 
+protocol."
 fi
 
 %files
 %defattr(-,root,root)
 %doc BUGS FAQ MINOR-BUGS NEWS PROJECTS TODO README
 %doc doc/*.ps
-%{prefix}/bin/cvs
-%{prefix}/bin/cvsbug
-%{prefix}/bin/rcs2log
-%{prefix}/man/man1/cvs.1*
-%{prefix}/man/man5/cvs.5*
-%{prefix}/man/man8/cvsbug.8*
-%{prefix}/info/cvs*
-%{prefix}/lib/cvs
-%{prefix}/sbin/cvspserver
+%{_bindir}/cvs
+%{_bindir}/cvsbug
+%{_bindir}/rcs2log
+%{_mandir}/man1/cvs.1*
+%{_mandir}/man5/cvs.5*
+%{_mandir}/man8/cvsbug.8*
+%{_infodir}/cvs*
+%{_libdir}/cvs
+%{_sbindir}/cvspserver
 %config(noreplace) /etc/cvs/cvs.conf
 
 %changelog
+* Sun Jul 09 2000 Stefan van der Eijk <[EMAIL PROTECTED]> 1.10.8-2mdk
+- fixed makeinstall problem
+- macroized
+
 * Tue Mar 28 2000 Frederic Lepied <[EMAIL PROTECTED]> 1.10.8-1mdk
 - 1.10.8
 - created /usr/sbin/cvspserver to launch cvs pserver according to

Reply via email to