added lcms spec file example. started validation prototype script
--- a/components/gnu-file/Makefile Wed May 19 00:08:03 2010 -0500
+++ b/components/gnu-file/Makefile Wed May 19 17:29:02 2010 +0200
@@ -35,9 +35,7 @@
BUILD_PKG_DEPENDENCIES= make \
wget \
gnu-coreutils \
- $(C_COMPILER) \
gnu-grep \
- developer/object-file
build: unpack
$(MAKE) check_dependencies
--- a/components/lcms/Makefile Wed May 19 00:08:03 2010 -0500
+++ b/components/lcms/Makefile Wed May 19 17:29:02 2010 +0200
@@ -25,13 +25,15 @@
PATH=/usr/bin:/usr/gnu/bin
COMPONENT_NAME= lcms
-COMPONENT_VERSION= 1.19
+COMPONENT_VERSION= 2-2.0
COMPONENT_DESCRIPTION= "Little Color Management System"
-COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_SRC= $(COMPONENT_NAME)$(COMPONENT_VERSION)
COMPONENT_COPYRIGHT= $(COMPONENT_SRC)/COPYING
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
-COMPONENT_ARCHIVE_HASH= d5b075ccffc0068015f74f78e4bc39138bcfe2d4
-COMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/lcms/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)?use_mirror=voxel
+#COMPONENT_ARCHIVE_HASH= 4f192cfd36d8b819e6885571401f949220609005
+COMPONENT_ARCHIVE_URL= http://download.sourceforge.net/project/lcms/lcms/2.0/$(COMPONENT_ARCHIVE)
+#COMPONENT_ARCHIVE_HASH= d5b075ccffc0068015f74f78e4bc39138bcfe2d4
+#COMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/lcms/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)?use_mirror=voxel
include ../../make-rules/prep.mk
include ../../make-rules/configure.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spec-files/lcms.spec Wed May 19 17:29:02 2010 +0200
@@ -0,0 +1,66 @@
+#
+# spec file for package lcms
+#
+%include Solaris.inc
+%define src_name lcms
+%define src_url http://download.sourceforge.net/project/lcms/lcms/
+
+# The system doesn't support package names such as:
+# text/less
+
+Name: lcms
+Summary: An open source color management engine
+License: GPL
+Group: Utilities
+Distribution: OpenSolaris
+Version: 2-2.0a
+Source: %{src_url}/2.0/%{src_name}%{version}.tar.gz
+SUNW_BaseDir: %{_basedir}
+SUNW_Copyright: %{name}.copyright
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+
+# OpenSolaris IPS Manifest Fields
+Meta(info.upstream): Marti Maria
+Meta(info.maintainer): Marti Maria
+Meta(info.repository_url): http://www.littlecms.com/
+Meta(pkg.summary): open source color management engine
+
+%description
+Little CMS intends to be a small-footprint color management engine,
+with special focus on accuracy and performance.
+
+# Examples only:
+Requires: SUNWglib2
+BuildRequires: SUNWglib2-devel
+
+%prep
+%setup -q -n %{src_name}-2.0
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+ CPUS=1
+fi
+./configure --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --bindir=%{_bindir} \
+ --datadir=%{_datadir}
+make -j $CPUS
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+#rm -rf $RPM_BUILD_ROOT
+
+%files
+%{_bindir}/*
+%{_libdir}/*
+%{_datadir}/*
+%{_includedir}/*
+
+%changelog
+Wed 19 May 2010 [email protected]
+- Initial spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spec-files/validation/validation.pl Wed May 19 17:29:02 2010 +0200
@@ -0,0 +1,58 @@
+#!/bin/perl
+
+sub traverse {
+ my ($dir, @callbacks) = @_;
+ my $present;
+
+ opendir $present, $dir or return();
+
+ for (grep { ! /^(\.|\.\.)$/ } readdir $present) {
+ my $path = "$dir/$_";
+
+ foreach $validation (@callbacks)
+ {
+ &$validation($path);
+ }
+ traverse($path, @callbacks) if -d $path;
+ }
+
+ closedir $present;
+ return();
+}
+
+sub checkManpage {
+ my $file = shift;
+ if (-T $file) {
+ if ($file =~ /\/man\//) {
+ my $attribute_section = 0;
+ open (FILE, $file);
+ while (<FILE>) {
+ if (/\.so /) { return; }#reference only manpage
+ if (/.SH.*ATTRIBUTES/) {
+ $attribute_section = 1;
+ }
+ }
+ close (FILE);
+ if ($attribute_section == 0) {
+ print "MAN CHECK : Error in $file\n\tNo attribute section missing\n";
+ }
+ }
+ }
+ return;
+}
+
+
+sub checkExecutableNotWritable {
+ my $file = shift;
+ if (not -d $file and -x $file and -w $file)
+ {
+ print "ATTRIBUTE CHECK : Error in $file\n\texecutable file should not be writable\n";
+ }
+ return;
+}
+
+@validationFcts = (\&checkManpage, \&checkExecutableNoWritable);
+
+
+traverse($ARGV[0], @validationFcts);
+