perforce.spec #1

  • //
  • guest/
  • andreas_scherer/
  • perforce.spec
  • View
  • Commits
  • Open Download .zip Download (9 KB)
Name: perforce
Summary: Perforce - The Fast SCM System
Version: 2005.2
Release: 3
License: Copyright 1997-2006 Perforce Software. All Rights Reserved
Group: Productivity/Development
URL: http://www.perforce.com
Distribution: SuSE 10.0 (i586)
# The main binaries are optimized for Linux Kernel 2.6
Source0: http://www.perforce.com/downloads/perforce/r05.2/bin.linux26x86/p4
Source1: http://www.perforce.com/downloads/perforce/r05.2/bin.linux26x86/p4web
Source2: http://www.perforce.com/downloads/perforce/r05.2/bin.linux26x86/p4p
Source3: http://www.perforce.com/downloads/perforce/r05.2/bin.linux26x86/p4d
# The Perforce Visual CLient is available only for Linux Kernel 2.4
Source10: http://www.perforce.com/downloads/perforce/r05.2/bin.linux24x86/p4v.tgz
# Complete documentation and manuals
Source20: http://www.perforce.com/perforce/doc.052/doc2005.2.zip
# Selected White Paper pages are merged into another (local) archive
Source30: http://www.perforce.com/perforce/bestpractices.html
Source31: http://www.perforce.com/perforce/branch.html
Source32: http://www.perforce.com/perforce/distributed.html
Source33: http://www.perforce.com/perforce/life.html
Source34: http://www.perforce.com/perforce/hardware.html
Source35: http://www.perforce.com/perforce/prettycode.html
Source36: http://www.perforce.com/perforce/understanding.html
Source37: http://www.perforce.com/perforce/wan.html
Source38: http://www.perforce.com/perforce/wcm.html
# Perforce Generic API
Source40: ftp://ftp.perforce.com/pub/perforce/r0.52/bin.linux26x86/p4api.tar
# Perforce Perl API
Source50: http://public.perforce.com/guest/tony_smith/perforce/API/Perl/released/P4-3.4804.tar.gz
# Test #7 fails!
Patch50: p4perl.patch
# Perforce Ruby API
Source60: http://public.perforce.com/guest/tony_smith/perforce/API/Ruby/release/P4Ruby-1.4841.tar.gz
# Incorrect regular expression!
Patch60: p4ruby.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: i586

%description
'Perforce' is a software configuration managment (SCM) tool that enables
developers to version files, track changes to software development, manage
releases, track defects, manage builds, and so on.

Although a build management tool is not built into 'Perforce', 'Perforce'
offers a companion open source product called 'Jam'. The 'Jam' tool and
'Perforce' are independent of each other; source files managed by Perforce
are easily built by 'Jam'.

%prep
mkdir -p %{version}
cd %{version}
cp %{S:0} %{S:1} %{S:2} %{S:3} .
tar xzvf %{S:10}
unzip -o %{S:20}
cp %{S:30} %{S:31} %{S:32} %{S:33} %{S:34} %{S:35} %{S:36} %{S:37} %{S:38} .
tar xvf %{S:40}
tar xzvf %{S:50}
chmod 644 P4-3.4804/test.pl.skel
%patch50
tar xzvf %{S:60}
chmod 644 P4Ruby-1.4841/p4conf.rb
%patch60

%build
cd $RPM_BUILD_DIR/%{version}/P4-3.4804
perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr/ << EOF
/usr/include/perforce
localhost:1965
EOF
make; make test
cd $RPM_BUILD_DIR/%{version}/P4Ruby-1.4841
ruby p4conf.rb --apidir=$RPM_BUILD_DIR/%{version}
make << EOF
2005.2
EOF

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin
cd $RPM_BUILD_DIR/%{version}
cp p4 p4d p4p p4v p4web $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/include/perforce
cp Version *.h $RPM_BUILD_ROOT/usr/include/perforce
mkdir -p $RPM_BUILD_ROOT/usr/lib
cp *.a $RPM_BUILD_ROOT/usr/lib
mkdir -p $RPM_BUILD_ROOT/usr/share/perforce/{doc,icons,p4vhelp,p4api}
cp P4VResources/icons/* $RPM_BUILD_ROOT/usr/share/perforce/icons
cp -r P4VResources/p4vhelp/* $RPM_BUILD_ROOT/usr/share/perforce/p4vhelp
mkdir -p $RPM_BUILD_ROOT/usr/share/perforce/doc/white-papers
cp *.html $RPM_BUILD_ROOT/usr/share/perforce/doc/white-papers
cp -r doc.042/manuals/* $RPM_BUILD_ROOT/usr/share/perforce/doc
cp -r doc.052/manuals/* $RPM_BUILD_ROOT/usr/share/perforce/doc
cp Jam* *.cc $RPM_BUILD_ROOT/usr/share/perforce/p4api
cd $RPM_BUILD_DIR/%{version}/P4-3.4804; make install
rm -f $RPM_BUILD_ROOT/usr/lib/perl5/5.8.7/i586-linux-thread-multi/perllocal.pod
cd $RPM_BUILD_DIR/%{version}/P4Ruby-1.4841; make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/usr/share/perforce/doc/p4ruby
cp doc/* $RPM_BUILD_ROOT/usr/share/perforce/doc/p4ruby

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%attr(755,andreas,users)/usr/bin/p4
%attr(755,andreas,users)/usr/bin/p4d
%attr(755,andreas,users)/usr/bin/p4p
%attr(755,andreas,users)/usr/bin/p4web

%post

%postun

%package p4v
Summary: P4 Visual Client
Group: Productivity/Development
Requires: perforce = %{version}
%description p4v
P4V is the P4 Visual Client.
%files p4v
%defattr(644,root,root,755)
%attr(755,andreas,users)/usr/bin/p4v
/usr/share/perforce/icons
/usr/share/perforce/p4vhelp/p4images
/usr/share/perforce/p4vhelp/*.html
/usr/share/perforce/p4vhelp/p4v-gs.pdf
%dir /usr/share/perforce/p4vhelp
%doc /usr/share/perforce/doc/p4v-gs
%dir /usr/share/perforce/doc
%dir /usr/share/perforce

%package whitepapers
Summary: SCM whitepapers
Group: Productivity/Development
Requires: perforce = %{version}
%description whitepapers
Whitepapers and best practices by Perforce Inc.
%files whitepapers
%defattr(644,root,root,755)
%doc /usr/share/perforce/doc/white-papers
%dir /usr/share/perforce/doc
%dir /usr/share/perforce

%package manual
Summary: Perforce documentation and manual
Group: Productivity/Development
Requires: perforce = %{version}
%description manual
Perforce documentation and manual
%files manual
%defattr(644,root,root,755)
%doc /usr/share/perforce/doc/cmd2win
%doc /usr/share/perforce/doc/cmdref
%doc /usr/share/perforce/doc/intro
%doc /usr/share/perforce/doc/p4ftp
%doc /usr/share/perforce/doc/p4guide
%doc /usr/share/perforce/doc/p4plugins
%doc /usr/share/perforce/doc/p4report
%doc /usr/share/perforce/doc/p4sag
%doc /usr/share/perforce/doc/p4win-gs
%dir /usr/share/perforce/doc
%dir /usr/share/perforce

%package p4api
Summary: Perforce C++ API
Group: Productivity/Development
Requires: perforce = %{version}
%description p4api
Header files and libraries for the C++ API
%files p4api
%defattr(644,root,root,755)
/usr/include/perforce/Version
/usr/include/perforce/debug.h
/usr/include/perforce/filesys.h
/usr/include/perforce/strdict.h
/usr/include/perforce/stdhdrs.h
/usr/include/perforce/vararray.h
/usr/include/perforce/clientuser.h
/usr/include/perforce/pathsys.h
/usr/include/perforce/clientapi.h
/usr/include/perforce/error.h
/usr/include/perforce/datetime.h
/usr/include/perforce/runcmd.h
/usr/include/perforce/echoctl.h
/usr/include/perforce/diff.h
/usr/include/perforce/i18napi.h
/usr/include/perforce/netconnect.h
/usr/include/perforce/clientmerge.h
/usr/include/perforce/enviro.h
/usr/include/perforce/errorlog.h
/usr/include/perforce/errornum.h
/usr/include/perforce/options.h
/usr/include/perforce/spec.h
/usr/include/perforce/handler.h
/usr/include/perforce/ident.h
/usr/include/perforce/msgclient.h
/usr/include/perforce/p4tags.h
/usr/include/perforce/strtable.h
/usr/include/perforce/threading.h
/usr/include/perforce/strbuf.h
/usr/include/perforce/keepalive.h
/usr/include/perforce/strops.h
/usr/include/perforce/ntservice.h
/usr/include/perforce/signaler.h
/usr/include/perforce/hostenv.h
%dir /usr/include/perforce
/usr/lib/libsupp.a
/usr/lib/libclient.a
/usr/lib/librpc.a
/usr/share/perforce/p4api
%doc /usr/share/perforce/doc/p4api
%dir /usr/share/perforce/doc
%dir /usr/share/perforce

%package p4perl
Summary: Perforce Perl API
Group: Productivity/Development
Requires: perforce-p4api = %{version}
BuildRequires: perforce
%description p4perl
Object-oriented Perl API
%files p4perl
%defattr(644,root,root,755)
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/P4.pm
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/P4/.packlist
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/P4/P4.bs
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/P4/P4.so
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/P4/autosplit.ix
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/example.pl
/usr/share/man/man3/P4.3pm.gz
%dir /usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/P4

%package p4ruby
Summary: Perforce Ruby API
Group: Productivity/Development
Requires: perforce-p4api = %{version}
%description p4ruby
Object-oriented Ruby API
%files p4ruby
%defattr(644,root,root,755)
/usr/lib/ruby/site_ruby/1.8/P4.rb
/usr/lib/ruby/site_ruby/1.8/i586-linux/P4.so
%doc /usr/share/perforce/doc/p4ruby
%dir /usr/share/perforce/doc
%dir /usr/share/perforce

%changelog
* Sat Feb 04 2006 Andreas Scherer <[email protected]> 2005.2-3
- Add Perforce Ruby API package.
* Wed Jan 18 2006 Andreas Scherer <[email protected]> 2005.2-3
- Use original files everywhere.
* Tue Jan 17 2006 Andreas Scherer <[email protected]> 2005.2-2
- Document the source paths.
* Mon Jan 16 2006 Andreas Scherer <[email protected]> 2005.2-1
- Update for Perforce 2005.2.
  Use multiple source archives.
  Create multiple target RPMs.
* Sun Dec 18 2005 Andreas Scherer <[email protected]> 2005.1-4
- Use defattr and attr for owner and rights modification
* Thu Oct 31 2005 Andreas Scherer <[email protected]> 2005.1-3
- Add 'rcstoperf.sh' script and documentation
* Thu Oct 31 2005 Andreas Scherer <[email protected]> 2005.1-2
- Fix access rights of installed documentation files
* Thu Oct 29 2005 Andreas Scherer <[email protected]> 2005.1-1
- Update for binaries and documentation
* Thu Oct 29 2005 Andreas Scherer <[email protected]> 2004.2-1
- Initial build
# Change User Description Committed
#1 5322 andreas_scherer Perforce installation on OpenSUSE 10.0 with RPM.
Instead of manually moving all the bits and pieces from different
HTTP/FTP/WHY locations on the Perforce server, collect them locally
and run "rpmbuild -ba perforce.spec" to create a concise set of
RPM files for controlled installation (and possible de-installation)
using "rpm -i" or YaST.