hi,

This is a fix to oscar-installer that does the following:
- Makefile.PL update
- Full spec file rewrite so it can build on centos-5 and centos-6 (and any 
standard rpm distro IMHO)
- Updated VERSION file to current svn oscar (6.1.2)
- Updated conf/oscar-installer.conf the best I could

When starting oscar-installer it seems to work fine. (no perl compilation 
errors and it starts downloading stuffs...)

Of course, the distro_repo_doc_url md5sum_file and supported_distros are not 
all on oscar web/ftp/wiki servers, thus some distros can't be installed that 
way (typicaly 6.1.2 for what were're interrested in).

Best regards,

Olivier.

--
   Olivier LAHAYE
   CEA DRT/LIST/DCSI/DIR
Index: conf/oscar-installer.conf
===================================================================
--- conf/oscar-installer.conf	(révision 9457)
+++ conf/oscar-installer.conf	(copie de travail)
@@ -14,11 +14,11 @@
 
 # URL of the documentation for the creation of a repository for the target Linux
 # distribution. This URL is specific to each version of OSCAR.
-distro_repo_doc_url = http://svn.oscar.openclustergroup.org/wiki/oscar:5.0:install_guide:ch3.5_advanced_repo
+distro_repo_doc_url = http://svn.oscar.openclustergroup.org/wiki/oscar:6.1.2:install_guide:ch3.5_advanced_repo
 
 # URL of the md5sum file for downloaded files. Only OSCAR developers could 
 # modify that parameter.
-md5sum_file = http://ftp.ussg.iu.edu/oscar/oscar-5.0-MD5SUMS
+md5sum_file = http://ftp.ussg.iu.edu/oscar/oscar-6.1.2-MD5SUMS
 
 # Supported Linux distribution for the current version of OSCAR. Standard users
 # should not modify this parameter.
@@ -29,4 +29,10 @@
                     mdv-2006-i386 \
                     rhel-4-i386 \
                     rhel-4-x86_64 \
+                    centos-5-i386 \
+                    centos-5-x86_64 \
+                    centos-6-i386 \
+                    centos-6-x86_64 \
+                    scientific_linux-6-i386 \
+                    scientific_linux-6-x86_64 \
                     suse-10.0-i386
Index: VERSION
===================================================================
--- VERSION	(révision 9457)
+++ VERSION	(copie de travail)
@@ -1 +1 @@
-5.0
+6.1.2
Index: Makefile.PL
===================================================================
--- Makefile.PL	(révision 9457)
+++ Makefile.PL	(copie de travail)
@@ -28,9 +28,7 @@
 
 WriteMakefile(
 	'VERSION' => $version,
-	'NAME' => 'oscar-installer',
-	'INSTALLBIN' => "/usr/bin",
-#	'INSTALLSITELIB' => "/usr/lib/oscar",
+	'NAME' => "oscar-installer",
 	'EXE_FILES' => [qw(
 		oscar-installer
 	)],
Index: oscar-installer.spec
===================================================================
--- oscar-installer.spec	(révision 9457)
+++ oscar-installer.spec	(copie de travail)
@@ -11,25 +11,20 @@
 # AND PLEASE, DO NOT MODIFY THIS SPEC FILE IN ORDER TO NOT USE ANY MORE THE 
 # MAKEFILE OR THE TARBALL, IF YOU DO THAT, THAT WILL QUICKLY BECOME MESSY!!!
 
-%define binpref /usr/lib/perl5/site_perl
-%define manpref /usr/share/man/man3
-%define bintarget $RPM_BUILD_ROOT%{binpref}
-%define mantarget $RPM_BUILD_ROOT%{manpref}
-
 Summary:		A tool to ease the OSCAR installation.
 Name:      		oscar-installer
-Version:   		5.0
-Release:   		2
+Version:   		6.1.2
+Release:   		1
 Vendor:			Open Cluster Group <http://OSCAR.OpenClusterGroup.org/>
-Distribution:	OSCAR
+Distribution:		OSCAR
 Packager:		Geoffroy Vallee <valle...@ornl.gov>
 License: 		GPL
 Group:     		Development/Libraries
 Source:			%{name}-%{version}.tar.gz
 BuildRoot: 		/usr/src/redhat/BUILD/%{name}-%{version}
-#BuildRoot:      /var/tmp/%{name}-buildroot
+#BuildRoot:		/var/tmp/%{name}-buildroot
 BuildArch:		noarch
-Requires:       perl-AppConfig
+Requires:		perl-AppConfig
 
 %description
 oscar-installer is a tool that installs OSCAR in a transparent manner. Two 
@@ -43,31 +38,34 @@
 "oscar-installer".
 
 %prep
-%__rm -rf /tmp/oscar-installer-sourceroot
-mkdir -p /tmp/oscar-installer-sourceroot
-cd /tmp/oscar-installer-sourceroot
-%__tar -xzf $RPM_SOURCE_DIR/%{name}-%{version}.tar.gz
-cd /tmp/oscar-installer-sourceroot/%{name}-%{version}
-perl Makefile.PL
-make manifest
+%setup -q
 
-make
+%build
+%__perl Makefile.PL INSTALLDIRS=vendor # INSTALLDIRS=vendor tells perl that we are in a package
+%__make manifest
+
+%__make
 %__rm -rf $RPM_BUILD_ROOT
-make install SITEPREFIX=/usr DESTDIR=$RPM_BUILD_ROOT \
-    INSTALLSITEMAN1DIR=/usr/share/man/man1
+%__make install SITEPREFIX=/usr DESTDIR=$RPM_BUILD_ROOT
+
 # For some reasons weird files are installed. We remove them.
-%__rm -f $RPM_BUILD_ROOT/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
-%__rm -f $RPM_BUILD_ROOT/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/oscar-installer/.packlist
+%__rm -f $RPM_BUILD_ROOT/usr/lib64/perl5/perllocal.pod
+%__rm -f $RPM_BUILD_ROOT/usr/lib64/perl5/vendor_perl/auto/oscar-installer/.packlist
 
 %files 
 %defattr(-,root,root)
-/usr/bin/oscar-installer
-/usr/share/man/man1/oscar-installer.1
-/usr/lib/perl5/site_perl/5.8.8/OSCARInstaller/ConfigManager.pm
-/usr/lib/perl5/site_perl/5.8.8/OSCARInstaller/Installer.pm
-/etc/oscar-installer/oscar-installer.conf
+%{_bindir}/oscar-installer
+%{_mandir}/man1/oscar-installer.1
+%{perl_vendorlib}/OSCARInstaller/ConfigManager.pm
+%{perl_vendorlib}/OSCARInstaller/Installer.pm
+%{_sysconfdir}/oscar-installer/oscar-installer.conf
 
 
 %changelog
+* Wed Jul 08 2012 Olivier Lahaye <olivier.lah...@cea.fr>
+- v6.1.2, new upstream version.
+- use setup macro to prepare build env
+- use INSTALLDIRS=vendor to build the Makefile
+- use of macros when it is possible
 * Sun Mar 17 2008 Geoffroy Vallee <valle...@ornl.gov>
 - v5.0, new upstream version.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to