install:opensuse
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
install:opensuse [2009-05-02 21:07] – created wernerflamme | install:opensuse [2015-08-10 13:16] (current) – replaced username with $HOME 2001:4dd0:ff00:9581:552f:20cd:616c:16b3 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== DokuWiki on openSUSE ====== | ====== DokuWiki on openSUSE ====== | ||
- | First, it is quite simple to install DokuWiki on openSUSE (or SLES/SLED). Download the tarball from http://www.splitbrain.org/ | + | First, it is quite simple to install DokuWiki on openSUSE (or SLES/SLED). Download the tarball from http://download.dokuwiki.org and unpack it into ''/ |
Second, to do all this manually is annoying. So I decided to use openSUSE' | Second, to do all this manually is annoying. So I decided to use openSUSE' | ||
Line 7: | Line 7: | ||
===== What did I do to create this rpm package? ===== | ===== What did I do to create this rpm package? ===== | ||
- | First, I had to put the DokuWiki files where they belong according to openSUSE' | + | First, I had to put the DokuWiki files where they belong according to openSUSE' |
- | <code bash> | + | On **2012-11-16** I edited the script so that the config files are now in ''/ |
+ | |||
+ | On **2015-07-02** I edited the script again so that the scripts now stay with "/ | ||
+ | |||
+ | <code bash prepdw.sh> | ||
#!/bin/bash | #!/bin/bash | ||
# an attempt to automatize packaging DokuWiki for openSUSE | # an attempt to automatize packaging DokuWiki for openSUSE | ||
- | RELEASE=' | + | set -x |
- | NEWNAME=$(echo " | + | |
- | WORKDIR='/ | + | RELEASE=' |
NO_OF_COMP=5 | NO_OF_COMP=5 | ||
- | WWWDIR=" | + | NEWNAME=$(echo " |
+ | WORKDIR=" | ||
+ | WWWDIR=" | ||
+ | NEWCONFDIR='/ | ||
+ | OLDCONFDIR=" | ||
- | mkdir -p " | + | mkdir -p " |
mkdir -p " | mkdir -p " | ||
# assume the standard download location | # assume the standard download location | ||
- | DLFROM=' | + | DLFROM=' |
- | DLFILE=" | + | DLFILE=" |
# and get the file | # and get the file | ||
- | wget -O " | + | wget -O " |
# unpack it | # unpack it | ||
cd " | cd " | ||
- | tar -xzf "dokuwiki.tgz" | + | tar -xzf "DokuWiki.tgz" |
- | rm "dokuwiki.tgz" | + | rm "DokuWiki.tgz" |
# move it into the right place, create config dirs | # move it into the right place, create config dirs | ||
- | mv " | + | mv " |
- | HTACCESSLIST=$(find " | + | HTACCESSLIST=$(find " |
- | cd " | + | cd " |
- | ln -s ../srv/www/dokuwiki/conf DokuWiki | + | mv " |
+ | cd " | ||
+ | ln -s "../../..${NEWCONFDIR}" | ||
+ | # remove executable flags | ||
+ | find " | ||
+ | chmod +x $WWWDIR/DokuWiki/bin/*php | ||
- | # write config for Apache | + | # write config for Apache |
# delete .htaccess, move it into Apache' | # delete .htaccess, move it into Apache' | ||
+ | cd " | ||
cat > ' | cat > ' | ||
- | Alias /dokuwiki "/ | + | Alias /dokuwiki "/ |
- | < | + | < |
Options None | Options None | ||
+ | AllowOverride All | ||
< | < | ||
DirectoryIndex doku.php index.html index.htm | DirectoryIndex doku.php index.html index.htm | ||
</ | </ | ||
- | | + | |
- | Order allow, | + | # Apache 2.4 |
- | Allow from all | + | Require all granted |
+ | | ||
+ | < | ||
+ | # Apache 2.2 | ||
+ | | ||
+ | Allow from all | ||
+ | </ | ||
</ | </ | ||
EOT | EOT | ||
+ | |||
for SUBDIR in $HTACCESSLIST; | for SUBDIR in $HTACCESSLIST; | ||
- | RELDIR=${SUBDIR# | + | |
- | RELDIR=${RELDIR%/ | + | RELDIR=${RELDIR%/ |
- | echo "< | + | echo "< |
- | cat " | + | cat " |
- | echo "</ | + | echo "</ |
- | echo " " >> | + | echo " " |
- | rm " | + | rm " |
done | done | ||
- | dos2unix -o ' | + | dos2unix -o ' |
cd " | cd " | ||
- | tar --strip-components=$NO_OF_COMP -cf "dokuwiki-${NEWNAME}.tar" | + | tar --strip-components=$NO_OF_COMP -cf "DokuWiki-${NEWNAME}.tar" |
- | gzip "dokuwiki-${NEWNAME}.tar" | + | bzip2 "DokuWiki-${NEWNAME}.tar" |
</ | </ | ||
- | Well, that's about all. The resulting file is used by the build process as well as the following '' | + | Well, that's about all. With a fast internet connection, the script runs in less that a minute for me :-). The resulting file is used by the build process as well as the following '' |
+ | |||
+ | ===== The ' | ||
- | < | + | < |
# | # | ||
# Spec File for Package DokuWiki | # Spec File for Package DokuWiki | ||
# | # | ||
- | Summary: | + | Summary: |
- | Summary(de): | + | Summary(de): |
- | Name: dokuwiki | + | Name: DokuWiki |
- | Version: | + | Version: |
- | Release: 1%{?dist} | + | Release: |
- | License: GPL v2 | + | License: |
- | Group: Productivity/ | + | Group: |
- | Distribution: | + | Distribution: |
- | Vendor: Andreas Gohr < | + | Vendor: |
- | URL: http:// | + | URL: http:// |
- | Requires: apache2-mod_php5 | + | Requires: |
- | Requires: php5 | + | Requires: |
- | PreReq: coreutils | + | PreReq: |
- | PreReq: apache2 | + | PreReq: |
- | BuildArch: noarch | + | BuildArch: |
- | Prefix: /srv/www | + | Prefix: |
- | Prefix: /etc | + | Prefix: |
- | Source: %{name}-%{version}.tar.gz | + | Source: |
- | Buildroot: %{_tmppath}/ | + | Buildroot: |
- | # %packager | + | |
%description | %description | ||
Line 132: | Line 155: | ||
%install | %install | ||
install -d $RPM_BUILD_ROOT/ | install -d $RPM_BUILD_ROOT/ | ||
- | install -d $RPM_BUILD_ROOT/ | + | install -d $RPM_BUILD_ROOT/ |
+ | install -d $RPM_BUILD_ROOT/ | ||
cp -a etc/* $RPM_BUILD_ROOT/ | cp -a etc/* $RPM_BUILD_ROOT/ | ||
cp -a srv/www/* $RPM_BUILD_ROOT/ | cp -a srv/www/* $RPM_BUILD_ROOT/ | ||
Line 141: | Line 165: | ||
%files | %files | ||
%defattr(-, wwwrun, www) | %defattr(-, wwwrun, www) | ||
- | /srv/www/dokuwiki | + | /srv/www/DokuWiki |
- | # %config / | + | %config / |
%config / | %config / | ||
%attr (644, root, root) / | %attr (644, root, root) / | ||
- | %attr (754, wwwrun, www) /srv/www/dokuwiki/ | + | %attr (644, wwwrun, www) / |
- | %attr (754, wwwrun, www) /srv/www/dokuwiki/ | + | %attr (754, wwwrun, www) /srv/www/DokuWiki/ |
- | %attr (754, wwwrun, www) /srv/www/dokuwiki/ | + | %attr (754, wwwrun, www) /srv/www/DokuWiki/ |
+ | %attr (754, wwwrun, www) /srv/www/DokuWiki/ | ||
+ | %attr (754, wwwrun, www) / | ||
+ | %attr (754, wwwrun, www) / | ||
%post | %post | ||
- | [ -L / | ||
- | [ -L / | ||
- | %changelog | ||
- | * Sat May 2 2009 Werner Flamme < | ||
- | - for details, look at http:// | ||
- | * Mon Dec 15 2008 Werner Flamme < | ||
- | - look at http:// | ||
</ | </ | ||
- | You can use the '' | + | You can use the '' |
install/opensuse.1241291226.txt.gz · Last modified: 2009-12-28 11:59 (external edit)