/[smecontribs]/rpms/smeserver-typo3/contribs8/smeserver-typo.spec
ViewVC logotype

Annotation of /rpms/smeserver-typo3/contribs8/smeserver-typo.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sun Mar 3 23:44:57 2013 UTC (11 years, 9 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-typo3-4_1_1-2_el5_sme, HEAD
Initial import

1 unnilennium 1.1 # $Id: smeserver-typo.spec,v 1.4 2008/11/25 16:20:32 slords Exp $
2     # Authority: nocvs
3     # Name: Dietmar Berteld
4    
5     %define name smeserver-typo3
6     %define version 4.1.1
7     %define release 2
8     %define rpmver 4.0.4
9    
10     Summary: Typo3 Content Management System Web Application for SME Server 7.x based on Typo3-4.1.1
11     Name: %{name}
12     Version: %{version}
13     Release: %{release}%{?dist}
14     License: GPL
15     Group: /Web/Applications
16     Source: %{name}-%{version}.tar.gz
17     URL: http://www.typo3.org
18     BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
19     BuildArchitectures: noarch
20     Requires: e-smith-base, e-smith-release >= 7
21     BuildRequires: e-smith-devtools
22    
23     %description
24     This RPM is an unofficial addon for the SME Server 7.x.
25     The target audience is the Linux/E-smith administrator
26     who wants to add CMS package .
27     Typo3 is a full-featured content management system that can be used for
28     everything from simple websites to complex corporate application.
29     After installation open your webbrowser your local site
30     http://your_e-smith-server_adress/index.php
31    
32    
33    
34     %changelog
35     * Sun Apr 29 2007 Dietmar Berteld <dietmar@berteld.com>
36     - [4.1.1-2] More security, chmod 400 to the install folder,
37     MySQL-user rights
38    
39     * Sat Apr 14 2007 Dietmar Berteld <dietmar@berteld.com>
40     - [4.1.1-1] New Typo3-Base = 4.1.1,
41     Change location to /opt/typo3,
42     Simpler method to create MySQL-Datebase
43     * Mon Jan 08 2007 Dietmar Berteld <dietmar@berteld.com>
44     - [4.0.4-1] New Typo3-Base = 4.04,
45     Change location for custom-template to /etc/e-smith/templates
46     Adding more rights to the user typo3user: ALTER, INDEX
47     for easy upgrade the typo3-installation
48    
49     * Thu Dec 14 2006 Dietmar Berteld <dietmar@berteld.com>
50     - [4.0.3-2] Delete the lat-ibays method for creating ibays
51    
52     * Thu Dec 14 2006 Dietmar Berteld <dietmar@berteld.com>
53     - [4.0.3-1] Initial version
54    
55     %prep
56     rm -rf $RPM_BUILD_ROOT
57    
58     %setup
59    
60     %build
61    
62     %install
63     /bin/rm -rf $RPM_BUILD_ROOT
64     (/usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
65     /bin/rm -f %{name}-%{version}-filelist
66     /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
67    
68    
69     %files -f %{name}-%{version}-filelist
70    
71     %defattr(-,root,root)
72    
73     %clean
74     rm -rf $RPM_BUILD_ROOT
75    
76     %pre
77    
78     %post
79    
80    
81     # Generating password
82     echo "Generating password..."
83     passok=0
84     while [ "$passok" != "1" ] ; do
85     openssl genrsa 32 > /root/pass.txt
86     pass=$(grep -v "PRIVATE KEY" < /root/pass.txt)
87     echo test > /root/pass.txt
88     sed -e "s/test/$pass/" /root/pass.txt >/root/pass.new
89     passok=$(grep -c $pass < /root/pass.new)
90     done
91     typo3pass=$pass
92     echo "Password is : $typo3pass"
93     rm -f /root/pass.txt
94     rm -f /root/pass.new
95    
96    
97     # Creating the database
98     echo "Creating database 'typo3' and user 'typo3user'"
99     mysqladmin -u root create typo3
100     mysql typo3 < typo3.sql
101     mysql -e " grant create, select, insert, update, delete, drop, index, alter on typo3.* \
102     to 'typo3user'@'localhost' \
103     identified by '$typo3pass' "
104     mysqladmin flush-privileges
105    
106     # Untar the application to /opt
107     echo "Untar typo3"
108     cd /opt
109     tar xzf dummy-4.1.1.tar.gz
110     tar xzf typo3_src-4.1.1.tar.gz
111     mv dummy-4.1.1 typo3
112     mv typo3_src-4.1.1 typo3
113     mv localconf.php /opt/typo3/typo3conf
114     mv l10n.tgz /opt/typo3/typo3conf/l10n
115     cd /opt/typo3
116     rm -rf typo3_src
117     ln -s typo3_src-4.1.1 typo3_src
118     rm -rf /opt/dummy-4.1.1.tar.gz
119     rm -rf /opt/typo3_src-4.1.1.tar.gz
120     cd /opt/typo3/typo3conf/l10n
121     tar xfz l10n.tgz
122     rm -rf l10n.tgz
123    
124     cd /opt/typo3
125     echo "Changing rights"
126     chgrp -R www fileadmin typo3conf typo3temp uploads
127     chmod -R g+w,o-rwx fileadmin typo3conf typo3temp uploads
128     chgrp -R www /opt/typo3/typo3/ext
129     chmod -R g+w,o-rwx /opt/typo3/typo3/ext
130     chmod -R 400 /opt/typo3/typo3/install
131     rm -rf /smeserver-typo3-4.1.1-2.spec
132     rm -rf /typo3.sql
133    
134    
135     # Change typo3-Password
136     cd /opt/typo3/typo3conf
137     sed 's.typo3password.'$typo3pass'.g' localconf.php > config_neu.php
138     variable=$(/sbin/e-smith/db configuration get DomainName)
139     sed "s/mydomain/$variable/g" config_neu.php > localconf.php
140     rm config_neu.php
141    
142     # Custom template fragment
143     /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
144     /etc/rc7.d/S86httpd-e-smith sigusr1
145    
146     echo "-----------------------------------------------------------"
147     echo "Typo3-Frontend: "
148     echo "go to http://your_e-smith-server/typo3"
149     echo " "
150     echo "Typo3-Backend:"
151     echo "go to http://your_e-smith-server/typo3/typo3"
152     echo "Username : admin"
153     echo "Password : password"
154     echo " "
155     echo "Please change the admin-password. "
156    
157    
158     %preun
159     # This section deletes the database
160     echo "Deleting database 'typo3' and user 'typo3user'"
161     mysql -u root -e "DROP DATABASE typo3"
162     mysql -u root -e "REVOKE ALL PRIVILEGES ON typo3.* FROM 'typo3user'@'localhost';"
163     mysql -u root -e "DROP USER typo3user@localhost;"
164    
165     # Delete folder /opt/typo3
166     echo "Deleting folder 'typo3'"
167     rm -rf /opt/typo3
168    
169     # Delete custom template fragment
170     /sbin/e-smith/expand-template etc/httpd/conf/httpd.conf
171     /etc/rc7.d/S86httpd-e-smith sigusr1
172    
173     %postun
174    
175    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed