I would like to create an easily installable debian package (.deb file) for MediaWiki 1.25.1 as I know from personal experience that for web programming noobs like myself, installing MediaWiki can seem like an impossible task.
I have read some guides on how to create debian packages, like this one for Ubuntu users and this one on Debian Wiki, but correct me if I'm wrong but they only seem to mention packages that are installed via the make
utility, while MediaWiki, being a Wiki application is installed (if you could even call it an installation) by creating an Apache & MySQL server database for the Wiki and running the setup scripts. But I know such a debian package can be made as there exists a really old version of MediaWiki in the PPA repositories (1.19) and it is a debian package.
I know the basic procedure of what any such package would need to do, namely (you should note that I'm getting much of this from my own memory plus this article at mediwiki.org):
- Install LAMP, or at a bare minimum install the packages
apache2
,mysql-server
,php5
,php5-mysql
andlibapache2-mod-php5
. Possibly viasudo apt-get install apache2 mysql-server php5 php5-mysql libapache2-mod-php5
. - Install some additional packages (strictly speaking they're optional, but they're incredibly helpful, especially if you're new to MediaWiki) such as
imagemagick
,inkscape
,php5-cli
andphpmyadmin
, also viasudo apt-get install...
It would be grand if an GUI could pop up during installation and prompt users as to which of these optional packages should be installed. Such an interface could also go through the process of setting a MySQL password) - Extract the tarball of MediaWiki 1.25.1 into
/var/lib/mediawiki
- Create a virtual link between
/var/lib/mediawiki
and/var/www/html/mediawiki
(by runningsudo ln -s /var/lib/mediawiki /var/www/html/mediawiki
) - Run
mysql_secure_installation
- Configure PHP (optional to the user) and restart Apache after.
- Configure Apache (more details on the mediawiki.org article I hyperlinked)
- Open browser to http://localhost/mediawiki to complete MediaWiki configuration.
I just don't know how to create a debian package that would do this. So all in all I would like someone's help so I may do this, so that MediaWiki installation on Ubuntu may be made that little bit easier for future users.
My attempt at creating a package myself
I created a directory, /home/fusion809/Debian packaging/bzr
so I can try following this guide on the mediawiki-1.25.1.tar.gz
tarball. I got down to here in the guide and the debian package I created (by running the bzr builddeb...
command in my /home/fusion809/Debian packaging/bzr/mediawiki/debian
directory) was only 2.4 kB in size (where the tarball is 23.7 MB) and gave the error message:
install-info: warning: no info dir entry in `/usr/share/info/lilypond/pictures/ross-beam-scan.jpg'
install-info: warning: no info dir entry in `/usr/share/info/lilypond/pictures/carter-brey.jpg'
install-info: warning: no info dir entry in `/usr/share/info/lilypond/pictures/darius-blasband.jpg'
install-info: warning: no info dir entry in `/usr/share/info/lilypond/pictures/orm-finnendahl.jpg'
install-info: warning: no info dir entry in `/usr/share/info/mime.info.gz'
when I tried to install it. If you're wondering what my control
file looks like, here it is:
Source: mediawiki
Section: unknown
Priority: optional
Maintainer: Brenton Horne <[email protected]>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.5
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://anonscm.debian.org/collab-maint/mediawiki.git
#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/mediawiki.git;a=summary
Package: mediawiki
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: MediaWiki, a free wiki application.
MediaWiki is a free and open-source wiki application written in PHP that is maintained by the Wikimedia Foundation. It depends on
Apache, MySQL and PHP.
my rules
file looks like:
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# main packaging script based on dh7 syntax
%:
dh $@
# debmake generated override targets
# This is example for Cmake (See http://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
apt-get download mediawiki
. Then right click -> open with -> Archive Manager.debian/*
files) from the PPA, and base your package off of that.