diff options
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rwxr-xr-x | PKGBUILD | 61 | ||||
-rw-r--r-- | xampp.install | 20 |
4 files changed, 79 insertions, 28 deletions
@@ -1,26 +1,28 @@ pkgbase = xampp pkgdesc = A free and open source cross-platform web server package (LAMP Stack), consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming languages - pkgver = 7.1.1 + pkgver = 7.2.3 pkgrel = 1 url = http://www.apachefriends.org/ install = xampp.install arch = x86_64 license = GPL + makedepends = fakeuser + makedepends = proot-3.2.1 depends = net-tools optdepends = polkit: to run XAMPP Manager from menu options = !strip source = lampp.service source = xampp-manager.desktop source = xampp-manager.png - md5sums = db1881f9564f18ed34d877035c28a4b8 - md5sums = cbf909c2c3ad89470463eed2ce003f97 - md5sums = f214711d95b8135f16974e36128f3a68 - source_x86_64 = https://sourceforge.net/projects/xampp-linux/files/xampp-linux-x64-7.1.1-0.tar.xz + sha256sums = 9aa2e9b2ec768b7e0d5394cf27653a7c9d0291a890d058293109f1aeace79150 + sha256sums = 595de672753af57c4abf1b4549530bba02b004bd45dfa82054d58ea3a174a4e6 + sha256sums = 3df1d2fa8a8dbba21944045503b94315e5b7bc38b968ca5a816a57b83c6fd77a + source_x86_64 = https://www.apachefriends.org/xampp-files/7.2.3/xampp-linux-x64-7.2.3-0-installer.run source_x86_64 = org.freedesktop.xampp-manager.policy source_x86_64 = xampp-manager-polkit - md5sums_x86_64 = a9ba3b9cc901065885bcd3a871a6a5a9 - md5sums_x86_64 = ba7853fd8b3125b0a783753ca5e23447 - md5sums_x86_64 = 9d246102ea20f27a13d119e57741ce7d + sha256sums_x86_64 = 56936439c458202b766fdf2e84136a104a475166c65c0cfa43fe722a9bca3a33 + sha256sums_x86_64 = 4092631d86ec1c3a155bfec76ea2c8433426a13f12a7a5866f843a099f1ca418 + sha256sums_x86_64 = 210beb9372baf79f01b783db6d93a0f9a07289af64dd72d9e09baecd0799a76b pkgname = xampp diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..cec1bb0eedc4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +pkg/ +src/ + +# Source files +xampp-linux-*-*-*-installer.run + +# Compressed package +xampp-*-*.pkg.tar.xz @@ -4,8 +4,8 @@ # Contributor: Jose Valecillos <valecillosjg (at) gmail (dot) com> # Contributor: Thiago Perrotta <echo dGhpYWdvcGVycm90dGE5NUBnbWFpbC5jb20K | base64 -d > -pkgname=xampp -pkgver=7.1.1 +pkgname='xampp' +pkgver='7.2.3' pkgrel=1 pkgdesc="A free and open source cross-platform web server package (LAMP Stack), consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl programming languages" url="http://www.apachefriends.org/" @@ -13,40 +13,63 @@ license=('GPL') arch=('x86_64') depends=('net-tools') optdepends=('polkit: to run XAMPP Manager from menu') +makedepends=('fakeuser' 'proot-3.2.1') source=('lampp.service' 'xampp-manager.desktop' 'xampp-manager.png') - -# Due to problems with proot the file -# "https://sourceforge.net/projects/xampp-linux/files/${pkgname}-linux-x64-${pkgver}-0.tar.xz" -# is a re-packed version of -# "https://www.apachefriends.org/xampp-files/${pkgver}/${pkgname}-linux-x64-${pkgver}-0-installer.run" - -source_x86_64=("https://sourceforge.net/projects/xampp-linux/files/${pkgname}-linux-x64-${pkgver}-0.tar.xz" +source_x86_64=("https://www.apachefriends.org/xampp-files/${pkgver}/${pkgname}-linux-x64-${pkgver}-0-installer.run" 'org.freedesktop.xampp-manager.policy' 'xampp-manager-polkit') options=(!strip) install='xampp.install' -md5sums=('db1881f9564f18ed34d877035c28a4b8' - 'cbf909c2c3ad89470463eed2ce003f97' - 'f214711d95b8135f16974e36128f3a68') -md5sums_x86_64=('a9ba3b9cc901065885bcd3a871a6a5a9' - 'ba7853fd8b3125b0a783753ca5e23447' - '9d246102ea20f27a13d119e57741ce7d') +sha256sums=('9aa2e9b2ec768b7e0d5394cf27653a7c9d0291a890d058293109f1aeace79150' + '595de672753af57c4abf1b4549530bba02b004bd45dfa82054d58ea3a174a4e6' + '3df1d2fa8a8dbba21944045503b94315e5b7bc38b968ca5a816a57b83c6fd77a') +sha256sums_x86_64=('56936439c458202b766fdf2e84136a104a475166c65c0cfa43fe722a9bca3a33' + '4092631d86ec1c3a155bfec76ea2c8433426a13f12a7a5866f843a099f1ca418' + '210beb9372baf79f01b783db6d93a0f9a07289af64dd72d9e09baecd0799a76b') + +_warning() { + + echo "Due to limitations of the .run file of this package, you now must" + echo "have a mysql user in your system prior to its build." + echo "You can either create a mysql user manually or just run fakepkg" + echo "instead of makepkg. You can pass normal makepkg parameters to it," + echo "such as fakepkg -si". + +} package() { install -dm755 "${pkgdir}/opt/lampp" - cp -r "${srcdir}/lampp"/* "${pkgdir}/opt/lampp" + + msg 'Creating a temporary mysql user/group with fakeadd (fakeuser)...' + + getent group mysql >/dev/null || fakeadd -G -n mysql -g 713 || _warning + getent passwd mysql >/dev/null || fakeadd -U -n mysql -g 713 -u 713 || _warning + + msg "Extracting package (this might take several minutes, don't give up!)..." + + chmod +x "${srcdir}/${pkgname}-linux-x64-${pkgver}-0-installer.run" + + # Using proot-3.2.1 (instead of the latest version) and passing the environment + # variable `PROOT_NO_SECCOMP=1` is only a workaround for this bug: + # https://github.com/proot-me/PRoot/issues/106 + PROOT_NO_SECCOMP=1 proot -0 \ + -b "${pkgdir}/opt/lampp:/opt/lampp" \ + "${srcdir}/${pkgname}-linux-x64-${pkgver}-0-installer.run" \ + --mode unattended --disable-components 'xampp_developer_files' --debuglevel 4 --launchapps 0 --debugtrace 'bitrock_debug.log' + + chmod g-s -R "${pkgdir}/opt/lampp" # Licenses install -dm755 "${pkgdir}/usr/share/licenses/xampp" cp "${pkgdir}/opt/lampp/licenses"/* "${pkgdir}/usr/share/licenses/xampp" # /usr/bin executables - install -dm755 "${pkgdir}"/usr/bin - ln -sf /opt/lampp/lampp "${pkgdir}/usr/bin/xampp" - ln -sf /opt/lampp/lampp "${pkgdir}/usr/bin/lampp" + install -dm755 "${pkgdir}/usr/bin" + ln -sf '/opt/lampp/lampp' "${pkgdir}/usr/bin/xampp" + ln -sf '/opt/lampp/lampp' "${pkgdir}/usr/bin/lampp" install -Dm755 "${srcdir}/xampp-manager-polkit" "${pkgdir}/usr/bin/xampp-manager_polkit" # Systemd service diff --git a/xampp.install b/xampp.install index 4c5a91ee7ca0..d58258302b82 100644 --- a/xampp.install +++ b/xampp.install @@ -1,30 +1,48 @@ post_install() { + + if ! id -u mysql &> /dev/null; then + + echo "Creating user 'mysql'..." + groupadd mysql -g 992 + useradd -u 992 -r -g mysql -s /bin/false mysql + + fi + echo "XAMPP is now installed below the /opt/lampp directory" echo "To start, stop or restart XAMPP simply call the command:" echo " lampp {start, stop, restart} or xampp {start, stop, restart}" echo "Then you can check that everything really works, Just enter the following URL at your web browser:" echo " http://localhost" + } pre_upgrade() { + /opt/lampp/lampp stop >/dev/null 2>&1 cp -r /opt/lampp/ /opt/lampp_backup echo "Your /opt/lampp/ folder were backed up to /opt/lampp/htdocs_backup" + } post_upgrade() { + echo "REMEMBER: Your /opt/lampp folder were backed up to /opt/lampp_backup" echo "Restore manually the needed configuration files." + } pre_remove() { - echo "Stopping lampp services" + + echo "Stopping lampp services..." /opt/lampp/lampp stop >/dev/null 2>&1 cp -r /opt/lampp/htdocs /opt/lampp/htdocs_backup echo "Your htdocs folder were backed up to /opt/lampp/htdocs_backup" + } post_remove() { + rm -rf /opt/lampp/{etc,var} + } |