gunnar: server/kolabconf .cvsignore, NONE, 1.1 MANIFEST, 1.1, 1.2 Makefile.PL, 1.1, 1.2 kolabconf.spec, 1.1, 1.2
cvs at kolab.org
cvs at kolab.org
Wed Aug 1 14:34:33 CEST 2007
- Previous message: gunnar: server/kolabconf/lib/Kolab Conf.pm,1.1,1.2
- Next message: gunnar: server/kolabconf DEVELOPMENT, NONE, 1.1 AUTHORS, 1.1, 1.2 Changes, 1.1, 1.2 Makefile.PL, 1.2, 1.3 kolabconf.spec, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: gunnar
Update of /kolabrepository/server/kolabconf
In directory doto:/tmp/cvs-serv15108
Modified Files:
MANIFEST Makefile.PL kolabconf.spec
Added Files:
.cvsignore
Log Message:
Fixed the new kolabconf package definition.
--- NEW FILE: .cvsignore ---
*.tar.gz
Makefile
blib
pm_to_blib
*.src.rpm
Index: MANIFEST
===================================================================
RCS file: /kolabrepository/server/kolabconf/MANIFEST,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MANIFEST 1 Aug 2007 10:38:32 -0000 1.1
+++ MANIFEST 1 Aug 2007 12:34:31 -0000 1.2
@@ -1,6 +1,8 @@
AUTHORS
-bin/kolabconf
+bin/kolabconf.in
Changes
INSTALL
lib/Kolab/Conf.pm
+Makefile.PL
+MANIFEST
README
Index: Makefile.PL
===================================================================
RCS file: /kolabrepository/server/kolabconf/Makefile.PL,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Makefile.PL 1 Aug 2007 10:38:32 -0000 1.1
+++ Makefile.PL 1 Aug 2007 12:34:31 -0000 1.2
@@ -3,44 +3,126 @@
use warnings;
use ExtUtils::MakeMaker;
-use Getopt::Std;
+use Getopt::Long;
-getopts('ch');
+my $HELP = 0;
+my $CONFIG = '/kolab/etc/kolab/kolab.globals';
+my $INSTALLSCRIPT = '/kolab/sbin';
-if ($opt_h) {
+GetOptions(
+ "config=s" => \$CONFIG,
+ "bin=s" => \$INSTALLSCRIPT,
+ "help" => \$HELP
+ );
+
+if ($HELP) {
print <<'EOH';
-Usage: perl Makefile.PL [-c CONFIG_FILE] -h
+Usage: perl Makefile.PL [--config CONFIG_FILE] [--bin BIN_DIR] --help
-Option c (config file) to specify the path to the kolab.globals
- configuration file. The default is
- /kolab/etc/kolab/kolab.globals but this may
- vary depending on your installation.
+Option config
-Option h (help) to get this text.
+ to specify the path to the kolab.globals configuration file. The
+ default is /kolab/etc/kolab/kolab.globals but this may vary
+ depending on your installation.
+
+Option bin
+
+ to specify the path to the directory where the kolabconf script
+ should be installed.
+
+Option help
+
+ to get this text.
EOH
exit 0;
}
-if ($opt_c) {
- my $CONFIG = $opt_c;
-} else {
- my $CONFIG = '/kolab/etc/kolab/kolab.globals';
+# Add the dist_openpkg target to the dist target
+sub MY::dist {
+ package MY; # To help SUPER work right
+ my $self = shift;
+ my @m;
+
+ push(@m, $self->SUPER::dist(@_));
+
+ my $dist = join "", @m;
+
+ $dist =~ s/(dist.*)/$1 dist_openpkg/;
+
+ return $dist;
+}
+
+# Remove additional files
+sub MY::veryclean {
+ package MY; # To help SUPER work right
+ my $self = shift;
+ my @m;
+
+ push(@m, $self->SUPER::clean(@_));
+
+ my $clean = join "", @m;
+
+ $clean =~ s/(clean.*)/$1 clean_openpkg clean_scripts/;
+
+ return $clean;
}
sub MY::postamble {
- return <<'MAKE_POST';
+
+ my $add = ".PHONY: bin/kolabconf
bin/kolabconf: bin/kolabconf.in
- cat $< | sed -e 's#@CONFIG_FILE@#$CONFIG#' > $@
+ cat \$< | sed -e 's#\@CONFIG_FILE@#$CONFIG#' > \$@
-MAKE_POST
+ifeq \"x\$(RPM)\" \"x\"
+ RPM = \$(HOME)/bin/openpkg rpm
+endif
+ifeq \"x\$(KOLABRPMSRC)\" \"x\"
+ KOLABRPMSRC = /kolab/RPM/SRC
+endif
+ifeq \"x\$(KOLABRPMPKG)\" \"x\"
+ KOLABRPMPKG = /kolab/RPM/PKG
+endif
+ifeq \"x\$(KOLABRPMTMP)\" \"x\"
+ KOLABRPMTMP = /kolab/RPM/TMP
+endif
+
+PACKAGE = \$(shell [ -r \"kolabconf.spec\" ] && grep '%define[ ]*V_package' kolabconf.spec | sed -e 's/.*V_package\\s*\\([a-z\\-\\_]*\\).*/\\1/')
+VERSION = \$(shell [ -r \"kolabconf.spec\" ] && grep '%define[ ]*V_version' kolabconf.spec | sed -e 's/.*V_version\\s*\\([0-9.]*\\).*/\\1/')
+RELEASE = \$(shell [ -r \"kolabconf.spec\" ] && grep '%define[ ]*V_release' kolabconf.spec | sed -e 's/.*V_release\\s*\\([0-9]*\\).*/\\1/')
+
+clean_all: veryclean
+ rm -rf bin/kolabconf
+ rm -rf \$(KOLABRPMTMP)/\$(PACKAGE)
+ rm -rf \$(PACKAGE)-\$(VERSION)-\$(RELEASE).src.rpm
+ rm -rf *.tar.gz
+ rm -rf *~
+
+dist_openpkg: kolabconf.spec \$(PACKAGE)-\$(VERSION)-\$(RELEASE).src.rpm
+ cp \$(PACKAGE)-\$(VERSION)-\$(RELEASE).src.rpm ../stage/
+
+\$(PACKAGE)-\$(VERSION)-\$(RELEASE).src.rpm: \$(PACKAGE).spec
+ test -d \$(KOLABRPMSRC)/\$(PACKAGE) || mkdir \$(KOLABRPMSRC)/\$(PACKAGE)
+ cp \$(PACKAGE).spec \$(KOLABRPMSRC)/\$(PACKAGE)
+ cp \$(PACKAGE)-\$(VERSION).tar.gz \$(KOLABRPMSRC)/\$(PACKAGE)
+ cd \$(KOLABRPMSRC)/\$(PACKAGE) && \$(RPM) -ba \$(PACKAGE).spec
+ cp -p \$(KOLABRPMPKG)/\$(PACKAGE)-\$(VERSION)-\$(RELEASE).src.rpm .
+
+";
+
+ return $add;
}
WriteMakefile(
- NAME => 'Kolab::Conf',
+ NAME => 'kolabconf',
VERSION_FROM => 'bin/kolabconf.in',
INSTALLDIRS => 'vendor',
EXE_FILES => [ 'bin/kolabconf', ],
- ABSTRACT_FROM => 'lib/Kolab/Conf.pm',
+ INSTALLSCRIPT => $INSTALLSCRIPT,
+ ABSTRACT =>
+'kolabconf provides the central mechanism to the configuration concept
+of the Kolab server. It rewrites the Kolab configuration templates
+into the final configuration files and handles the necessary magic
+associated to that process.',
AUTHOR => 'Stuart Bingë and others (see AUTHORS file)'
);
Index: kolabconf.spec
===================================================================
RCS file: /kolabrepository/server/kolabconf/kolabconf.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- kolabconf.spec 1 Aug 2007 10:38:32 -0000 1.1
+++ kolabconf.spec 1 Aug 2007 12:34:31 -0000 1.2
@@ -43,7 +43,7 @@
Release: %{V_release}
# list of sources
-Source0:
+Source0: %{V_package}-%{V_version}.tar.gz
# build information
Prefix: %{l_prefix}
@@ -67,7 +67,7 @@
%install
rm -rf $RPM_BUILD_ROOT
%{l_prefix}/bin/perl-openpkg prepare
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} -A "-c %{l_prefix}/etc/kolab/kolab.globals" configure build install
+ %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} -v -A "--config \"%{l_prefix}/etc/kolab/kolab.globals\" --bin \"%{l_prefix}/sbin\"" configure build install
%{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
- Previous message: gunnar: server/kolabconf/lib/Kolab Conf.pm,1.1,1.2
- Next message: gunnar: server/kolabconf DEVELOPMENT, NONE, 1.1 AUTHORS, 1.1, 1.2 Changes, 1.1, 1.2 Makefile.PL, 1.2, 1.3 kolabconf.spec, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the commits
mailing list