summaryrefslogtreecommitdiff
path: root/kolab-fbview
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2008-09-18 09:43:18 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2008-09-18 09:43:18 (GMT)
commit0e9425df1484bb12b571ad1b172f610dd57f42cc (patch)
treefba029dcbdd1b68b967aca0093c80cdd1c85e46a /kolab-fbview
parente53f61bf16992789486866c4667c0c4631d7e4a2 (diff)
downloadserver-0e9425df1484bb12b571ad1b172f610dd57f42cc.tar.gz
Replace the server/horde/fbview-* packages with this single package.
Diffstat (limited to 'kolab-fbview')
-rw-r--r--kolab-fbview/.cvsignore1
-rw-r--r--kolab-fbview/ChangeLog4
-rw-r--r--kolab-fbview/Makefile72
-rw-r--r--kolab-fbview/fbview-kolab-conf.template21
-rw-r--r--kolab-fbview/fbview-kronolith-kolab-conf.template10
-rw-r--r--kolab-fbview/kolab-fbview.spec101
6 files changed, 209 insertions, 0 deletions
diff --git a/kolab-fbview/.cvsignore b/kolab-fbview/.cvsignore
new file mode 100644
index 0000000..77fcdcb
--- /dev/null
+++ b/kolab-fbview/.cvsignore
@@ -0,0 +1 @@
+*.src.rpm
diff --git a/kolab-fbview/ChangeLog b/kolab-fbview/ChangeLog
new file mode 100644
index 0000000..17113a4
--- /dev/null
+++ b/kolab-fbview/ChangeLog
@@ -0,0 +1,4 @@
+2008-09-18 Gunnar Wrobel <p@rdus.de>
+
+ * kolab-webclient.spec: Added package to Kolab CVS.
+
diff --git a/kolab-fbview/Makefile b/kolab-fbview/Makefile
new file mode 100644
index 0000000..7e4ec8f
--- /dev/null
+++ b/kolab-fbview/Makefile
@@ -0,0 +1,72 @@
+ifeq "x$(RPM)" "x"
+ RPM = $(HOME)/bin/openpkg rpm
+endif
+ifeq "x$(KOLABRPMSRC)" "x"
+ KOLABRPMSRC = $(HOME)/RPM/SRC
+endif
+ifeq "x$(KOLABRPMPKG)" "x"
+ KOLABRPMPKG = $(HOME)/RPM/PKG
+endif
+ifeq "x$(KOLABRPMTMP)" "x"
+ KOLABRPMTMP = $(HOME)/RPM/TMP
+endif
+
+HORDE_NAME = $(shell grep "%define[ ]*V_horde_name" *.spec | sed -e "s/.*V_horde_name \([a-z-]*\).*/\1/")
+YEAR = $(shell grep "%define[ ]*V_year" *.spec | sed -e "s/.*V_year\s*\([0-9]*\).*/\1/")
+MONTH = $(shell grep "%define[ ]*V_month" *.spec | sed -e "s/.*V_month\s*\([0-9]*\).*/\1/")
+DAY = $(shell grep "%define[ ]*V_day" *.spec | sed -e "s/.*V_day\s*\([0-9]*\).*/\1/")
+
+DATE = ${YEAR}-${MONTH}-${DAY}
+
+PACKAGE = $(shell grep "%define[ ]*V_package" *.spec | sed -e "s/.*V_package \([a-z-]*\).*/\1/")
+VERSION = $(shell grep "%define[ ]*V_version" *.spec | sed -e "s/.*V_version\s*\([0-9._a-z]*\).*/\1/")
+SOURCE_VERSION = $(shell grep "%define[ ]*V_source_version" *.spec | sed -e "s/.*V_source_version\s*\([0-9._a-z-]*\).*/\1/")
+PASSWD_VERSION = $(shell grep "%define[ ]*V_passwd_version" *.spec | sed -e "s/.*V_passwd_version\s*\([0-9._a-z]*\).*/\1/")
+RELEASE = ${YEAR}${MONTH}${DAY}
+
+PATCHES = http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/horde-webmail/$(VERSION)/horde-webmail-$(VERSION)_kolab_fbview_openpkg.patch
+TEMPLATES = $(shell find . -name "*.template")
+CONFIGS = $(shell find . -name "*.php")
+
+PACKAGE_0=$(HORDE_NAME)-$(SOURCE_VERSION).tar.gz
+SOURCE_0=http://ftp.horde.org/pub/$(HORDE_NAME)/$(PACKAGE_0)
+
+.PHONY: all
+all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+
+.PHONY: dist
+dist: all
+ cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm ../../stage/
+
+.PHONY: clean
+clean:
+ rm -rf /kolab/RPM/TMP/$(PACKAGE)
+ rm -rf $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+ rm -rf *~
+
+$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec $(TEMPLATES) $(CONFIGS) ChangeLog
+ test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
+ cd $(KOLABRPMSRC)/$(PACKAGE) && wget -c "$(SOURCE_0)"
+
+ cd $(KOLABRPMSRC)/$(PACKAGE) && for PATCH in $(PATCHES); do \
+ wget -c "$$PATCH"; done
+
+ cp $(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE)
+
+ if [ -n "$(TEMPLATES)" ]; then \
+ for TEMPLATE in $(TEMPLATES); \
+ do \
+ cp $$TEMPLATE $(KOLABRPMSRC)/$(PACKAGE);\
+ done; \
+ fi
+
+ if [ -n "$(CONFIGS)" ]; then \
+ for CONFIG in $(CONFIGS); \
+ do \
+ cp $$CONFIG $(KOLABRPMSRC)/$(PACKAGE); \
+ done; \
+ fi
+
+ cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec
+
+ cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
diff --git a/kolab-fbview/fbview-kolab-conf.template b/kolab-fbview/fbview-kolab-conf.template
new file mode 100644
index 0000000..3ba0693
--- /dev/null
+++ b/kolab-fbview/fbview-kolab-conf.template
@@ -0,0 +1,21 @@
+KOLAB_META_START
+TARGET=@@@webserver_document_root@@@/client/config/kolab.php
+PERMISSIONS=0600
+OWNERSHIP=@@@kolab_usr@@@:@@@kolab_grp@@@
+KOLAB_META_END
+<?php
+$conf['cookie']['domain'] = '@@@fqdnhostname@@@';
+$conf['cookie']['path'] = '/client';
+$conf['problems']['email'] = 'postmaster@@@@postfix-mydomain@@@';
+$conf['problems']['maildomain'] = '@@@postfix-mydomain@@@';
+$conf['kolab']['ldap']['server'] = '@@@fqdnhostname@@@';
+$conf['kolab']['ldap']['basedn'] = '@@@base_dn@@@';
+$conf['kolab']['ldap']['phpdn'] = '@@@php_dn@@@';
+$conf['kolab']['ldap']['phppw'] = '@@@php_pw@@@';
+@@@if cyrus-imap@@@
+$conf['kolab']['imap']['server'] = '@@@fqdnhostname@@@';
+@@@else@@@
+$conf['kolab']['imap']['server'] = '@@@local_addr@@@';
+@@@endif@@@
+$conf['kolab']['imap']['maildomain'] = '@@@postfix-mydomain@@@';
+?>
diff --git a/kolab-fbview/fbview-kronolith-kolab-conf.template b/kolab-fbview/fbview-kronolith-kolab-conf.template
new file mode 100644
index 0000000..a8d29ed
--- /dev/null
+++ b/kolab-fbview/fbview-kronolith-kolab-conf.template
@@ -0,0 +1,10 @@
+KOLAB_META_START
+TARGET=@@@webserver_document_root@@@/client/kronolith/config/kolab.php
+PERMISSIONS=0600
+OWNERSHIP=@@@kolab_usr@@@:@@@kolab_grp@@@
+KOLAB_META_END
+<?php
+$conf['storage']['default_domain'] = '@@@postfix-mydomain@@@';
+$conf['reminder']['server_name'] = '@@@fqdnhostname@@@';
+$conf['reminder']['from_addr'] = 'postmaster@@@@postfix-mydomain@@@';
+?>
diff --git a/kolab-fbview/kolab-fbview.spec b/kolab-fbview/kolab-fbview.spec
new file mode 100644
index 0000000..12dc973
--- /dev/null
+++ b/kolab-fbview/kolab-fbview.spec
@@ -0,0 +1,101 @@
+# Versions
+%define V_horde_name horde-webmail
+%define V_package kolab-fbview
+%define V_year 2008
+%define V_month 08
+%define V_day 18
+%define V_version 1.2.0
+%define V_source_version 1.2-rc1
+%define V_passwd_version 3.0.1
+%define V_date %{V_year}-%{V_month}-%{V_day}
+%define V_release %{V_year}%{V_month}%{V_day}
+
+# Package Information
+Name: %{V_package}
+Summary: The Kolab Groupware fbview tool (based on horde)
+URL: http://www.kolab.org/
+Packager: Gunnar Wrobel <wrobel@pardus.de> (p@rdus)
+Version: %{V_version}
+Release: %{V_release}
+Class: JUNK
+License: GPL
+Group: MAIL
+Distribution: OpenPKG
+
+# List of Sources
+Source0: http://ftp.horde.org/pub/%{V_horde_name}/%{V_horde_name}-%{V_source_version}.tar.gz
+Source1: fbview-kolab-conf.template
+Source2: fbview-kronolith-kolab-conf.template
+
+# List of Patches
+Patch0: http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/horde-webmail/%{V_version}/horde-webmail-%{V_version}_kolab_fbview_openpkg.patch
+
+# Build Info
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+
+#Pre requisites
+BuildPreReq: OpenPKG, openpkg >= 20070603
+BuildPreReq: php, php::with_pear = yes
+PreReq: kolabd::with_horde
+
+AutoReq: no
+AutoReqProv: no
+#BuildArch: noarch
+
+%description
+Kolab fbview provides a reduced Horde webmail version that allow to
+get a quick overview on the free/busy information from team members.
+
+%prep
+ %setup -q -c %{V_horde_name}-%{V_source_version}
+ %setup -T -D -a 1
+ mv passwd-h3-%{V_passwd_version} %{V_horde_name}-%{V_source_version}/passwd
+
+ cd %{V_horde_name}-%{V_source_version}
+ %patch -p1 -P 0
+ cd ..
+
+%build
+
+%install
+
+ %{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/fbview
+ %{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/tmp
+ %{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/storage
+ %{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates
+
+ cd %{V_horde_name}-%{V_source_version}
+
+ find . -name 'test.php' | xargs rm
+
+ find . -name '*.orig' | xargs rm
+
+ cp -r * $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/fbview/
+
+ sqlite $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/fbview/storage/horde.db < scripts/sql/groupware.sql
+
+ cd ..
+
+ rm -rf dimp imp ingo mimp mnemo nag
+
+ %{l_shtool} install -c -m 644 %{l_value -s -a} %{S:2} %{S:3} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates
+
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
+ '%config(noreplace) %{l_prefix}/etc/kolab/templates/fbview-kolab-conf.template' \
+ '%config(noreplace) %{l_prefix}/etc/kolab/templates/fbview-kronolith-kolab-conf.template' \
+ '%config(noreplace) %{l_prefix}/var/kolab/www/fbview/config/*.php' \
+ '%config(noreplace) %{l_prefix}/var/kolab/www/fbview/kronolith/config/*.php' \
+ '%config(noreplace) %{l_prefix}/var/kolab/www/fbview/turba/config/*.php' \
+ %dir '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/fbview/log \
+ %dir '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/fbview/tmp \
+ %dir '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/fbview/storage \
+ %dir '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/fbview/storage/horde.db \
+ '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/fbview/config/conf.php \
+ '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/fbview/**/config/conf.php
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
+%files -f files