This commit is contained in:
build@apk-groulx 2021-06-04 15:24:22 +00:00
parent af7eb7f636
commit 600a5bb90e
173 changed files with 16022 additions and 0 deletions

View file

@ -0,0 +1,42 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=airsonic-advanced
_pkgver=11.0.0
_snapshot=20210504201650
pkgver=${_pkgver}.${_snapshot}
_pkgver=${_pkgver}-SNAPSHOT.${_snapshot}
pkgrel=1
pkgdesc="A free, web-based media streamer and jukebox."
arch='noarch'
url="https://github.com/airsonic-advanced/airsonic-advanced/"
license='GPL3'
depends="openjdk11-jre flac lame ffmpeg"
backup='etc/airsonic/airsonic.conf'
noextract=airsonic.war
source="$pkgname-$_pkgver.war::https://github.com/airsonic-advanced/airsonic-advanced/releases/download/${_pkgver}/airsonic.war
airsonic.conf
airsonic.initd
airsonic.sh"
subpackages="$pkgname-openrc"
provides="airsonic"
options="!check"
package() {
cd ${srcdir}
mkdir -p $pkgdir/var/lib/airsonic
mkdir -p $pkgdir/etc/init.d
mkdir -p $pkgdir/etc/conf.d
mkdir -p $pkgdir/etc/airsonic
mkdir -p $pkgdir/usr/bin
install -Dm755 $srcdir/airsonic-advanced-$_pkgver.war $pkgdir/var/lib/airsonic/airsonic.war
install -Dm755 $srcdir/airsonic.initd $pkgdir/etc/init.d/airsonic
install -Dm644 $srcdir/airsonic.conf $pkgdir/etc/conf.d/airsonic
ln -s /etc/conf.d/airsonic $pkgdir/etc/airsonic/airsonic.conf
install -Dm755 $srcdir/airsonic.sh $pkgdir/usr/bin/airsonic
}
sha512sums="f1397fdb2e02300d327f7a1e42a89e5042b521756ddf995fc6eb46501cc4248580b8c9634fd9a449a8fb336471dd3831dadb50701e76572886417710f96d7fb8 airsonic-advanced-11.0.0-SNAPSHOT.20210504201650.war
0d0c543986a7db15202667461796ed1281e90c0f9c1b5b44bc0df48693f8b1f604b333bef54408c598c23bd9173b8641f102ad7f24ed7abf3316c61d0ca82cb6 airsonic.conf
1f190647bac0b09153de9121c7bb7a4d7ed316a388bbea7087f2a39d2cbe937b3b2f75c4598f887baf9110a4aa2b31745aadf1cade0dfe6a0e4d0f06b00facce airsonic.initd
cebf02fb303fa2587c35c06b86fa0235033aa991f74492ed14b8a777793ba2d832cc67fb66aab0ea5272513960314fafd217d7be32101fc47acb44ea68e03c4c airsonic.sh"

View file

@ -0,0 +1,19 @@
# Host and port to listen on
AIRSONIC_HOST=127.0.0.1
AIRSONIC_PORT=8080
# To disable https, set to 0
AIRSONIC_HTTPS_PORT=0
AIRSONIC_CONTEXT_PATH=/
AIRSONIC_MAX_MEMORY=1024
# Music directories
AIRSONIC_DEFAULT_MUSIC_FOLDER=/var/music
AIRSONIC_DEFAULT_PODCAST_FOLDER=/var/music/Podcast
AIRSONIC_DEFAULT_PLAYLIST_FOLDER=/var/playlists
NICELEVEL=0
# Further subsonic start script options, if ever needed
AIRSONIC_OPTS="

View file

@ -0,0 +1,43 @@
#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License, v2 or later
AIRSONIC_HOME=${AIRSONIC_HOME:-/var/lib/${SVCNAME}}
AIRSONIC_USER=${AIRSONIC_USER:-${SVCNAME}}
PIDFILE=/run/airsonic/airsonic.pid
depend() {
after net
}
start() {
checkpath -dq -o airsonic:airsonic -m 755 /run/airsonic/
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
--start --user "${AIRSONIC_USER}" --name airsonic \
--env HOME="${AIRSONIC_HOME}" --exec /usr/bin/airsonic \
--pidfile="${PIDFILE}" \
--nicelevel "${NICELEVEL}" \
-- \
--home="${AIRSONIC_HOME}" \
--host="${AIRSONIC_HOST}" \
--port="${AIRSONIC_PORT}" \
--https-port="${AIRSONIC_HTTPS_PORT}" \
--context-path="${AIRSONIC_CONTEXT_PATH}" \
--max-memory="${AIRSONIC_MAX_MEMORY}" \
--pidfile="${PIDFILE}" \
--default-music-folder="${AIRSONIC_DEFAULT_MUSIC_FOLDER}" \
--default-podcast-folder="${AIRSONIC_DEFAULT_PODCAST_FOLDER}" \
--default-playlist-folder="${AIRSONIC_DEFAULT_PLAYLIST_FOLDER}" \
--quiet
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --user "${AIRSONIC_USER}" \
--pidfile "${PIDFILE}" \
--wait 15000 \
--progress
eend $?
}

View file

@ -0,0 +1,135 @@
#!/bin/sh
###################################################################################
# Shell script for starting Airsonic. See http://airsonic.org.
#
# Author: Sindre Mehus
###################################################################################
AIRSONIC_HOME=/var/lib/airsonic
AIRSONIC_HOST=127.0.0.1
AIRSONIC_PORT=8080
AIRSONIC_HTTPS_PORT=0
AIRSONIC_CONTEXT_PATH=/
AIRSONIC_MAX_MEMORY=150
AIRSONIC_PIDFILE=
AIRSONIC_DEFAULT_MUSIC_FOLDER=/var/lib/media/music
AIRSONIC_DEFAULT_PODCAST_FOLDER=/var/lib/media/podcasts
AIRSONIC_DEFAULT_PLAYLIST_FOLDER=/var/lib/media/playlists
quiet=0
usage() {
echo "Usage: airsonic.sh [options]"
echo " --help This small usage guide."
echo " --home=DIR The directory where Airsonic will create files."
echo " Make sure it is writable. Default: /var/airsonic"
echo " --host=HOST The host name or IP address on which to bind Airsonic."
echo " Only relevant if you have multiple network interfaces and want"
echo " to make Airsonic available on only one of them. The default value"
echo " will bind Airsonic to all available network interfaces. Default: 0.0.0.0"
echo " --port=PORT The port on which Airsonic will listen for"
echo " incoming HTTP traffic. Default: 4040"
echo " --https-port=PORT The port on which Airsonic will listen for"
echo " incoming HTTPS traffic. Default: 0 (disabled)"
echo " --context-path=PATH The context path, i.e., the last part of the Airsonic"
echo " URL. Typically '/' or '/airsonic'. Default '/'"
echo " --max-memory=MB The memory limit (max Java heap size) in megabytes."
echo " Default: 100"
echo " --pidfile=PIDFILE Write PID to this file. Default not created."
echo " --quiet Don't print anything to standard out. Default false."
echo " --default-music-folder=DIR Configure Airsonic to use this folder for music. This option "
echo " only has effect the first time Airsonic is started. Default '/var/music'"
echo " --default-podcast-folder=DIR Configure Airsonic to use this folder for Podcasts. This option "
echo " only has effect the first time Airsonic is started. Default '/var/music/Podcast'"
echo " --default-playlist-folder=DIR Configure Airsonic to use this folder for playlists. This option "
echo " only has effect the first time Airsonic is started. Default '/var/playlists'"
exit 1
}
# Parse arguments.
while [ $# -ge 1 ]; do
case $1 in
--help)
usage
;;
--home=?*)
AIRSONIC_HOME=${1#--home=}
;;
--host=?*)
AIRSONIC_HOST=${1#--host=}
;;
--port=?*)
AIRSONIC_PORT=${1#--port=}
;;
--https-port=?*)
AIRSONIC_HTTPS_PORT=${1#--https-port=}
;;
--context-path=?*)
AIRSONIC_CONTEXT_PATH=${1#--context-path=}
;;
--max-memory=?*)
AIRSONIC_MAX_MEMORY=${1#--max-memory=}
;;
--pidfile=?*)
AIRSONIC_PIDFILE=${1#--pidfile=}
;;
--quiet)
quiet=1
;;
--default-music-folder=?*)
AIRSONIC_DEFAULT_MUSIC_FOLDER=${1#--default-music-folder=}
;;
--default-podcast-folder=?*)
AIRSONIC_DEFAULT_PODCAST_FOLDER=${1#--default-podcast-folder=}
;;
--default-playlist-folder=?*)
AIRSONIC_DEFAULT_PLAYLIST_FOLDER=${1#--default-playlist-folder=}
;;
*)
usage
;;
esac
shift
done
# Use JAVA_HOME if set, otherwise assume java is in the path.
JAVA=java
if [ -e "${JAVA_HOME}" ]
then
JAVA=${JAVA_HOME}/bin/java
fi
# Create Airsonic home directory.
mkdir -p ${AIRSONIC_HOME}
LOG=${AIRSONIC_HOME}/airsonic_sh.log
rm -f ${LOG}
cd $(dirname $0)
if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
cd $(dirname $(readlink $0))
fi
${JAVA} -Xmx${AIRSONIC_MAX_MEMORY}m \
-Dairsonic.home=${AIRSONIC_HOME} \
-Dairsonic.host=${AIRSONIC_HOST} \
-Dairsonic.port=${AIRSONIC_PORT} \
-Dairsonic.httpsPort=${AIRSONIC_HTTPS_PORT} \
-Dairsonic.contextPath=${AIRSONIC_CONTEXT_PATH} \
-Dairsonic.defaultMusicFolder=${AIRSONIC_DEFAULT_MUSIC_FOLDER} \
-Dairsonic.defaultPodcastFolder=${AIRSONIC_DEFAULT_PODCAST_FOLDER} \
-Dairsonic.defaultPlaylistFolder=${AIRSONIC_DEFAULT_PLAYLIST_FOLDER} \
-Djava.awt.headless=true \
-verbose:gc \
-jar ${AIRSONIC_HOME}/airsonic.war > ${LOG} 2>&1 &
# Write pid to pidfile if it is defined.
if [ $AIRSONIC_PIDFILE ]; then
echo $! > ${AIRSONIC_PIDFILE}
fi
if [ $quiet = 0 ]; then
echo Started Airsonic [PID $!, ${LOG}]
fi

View file

@ -0,0 +1,38 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=airsonic
pkgver=10.6.2
pkgrel=1
pkgdesc="A free, web-based media streamer and jukebox."
arch='noarch'
url="https://github.com/Airsonic/airsonic/"
license='GPL3'
depends="openjdk8-jre flac lame ffmpeg"
backup='etc/airsonic/airsonic.conf'
noextract=airsonic.war
source="$pkgname-$pkgver.war::https://github.com/airsonic/airsonic/releases/download/v${pkgver}/airsonic.war
airsonic.conf
airsonic.initd
airsonic.sh"
subpackages="$pkgname-openrc"
options="!check"
package() {
cd ${srcdir}
mkdir -p $pkgdir/var/lib/airsonic
mkdir -p $pkgdir/etc/init.d
mkdir -p $pkgdir/etc/conf.d
mkdir -p $pkgdir/etc/airsonic
mkdir -p $pkgdir/usr/bin
cp $srcdir/airsonic-$pkgver.war $pkgdir/var/lib/airsonic/airsonic.war
install -Dm755 $srcdir/airsonic.initd $pkgdir/etc/init.d/airsonic
cp $srcdir/airsonic.conf $pkgdir/etc/conf.d/airsonic
ln -s /etc/conf.d/airsonic $pkgdir/etc/airsonic/airsonic.conf
install -Dm755 $srcdir/airsonic.sh $pkgdir/usr/bin/airsonic
}
sha512sums="171d45592d919c58869cde77eefa117df83bab3c7cfdf6ca5b6f88ad5fc58492fad3529ce9d2fff287c33ebddb594148c2aead6badb537e492a794c0f73a8fae airsonic-10.6.2.war
0d0c543986a7db15202667461796ed1281e90c0f9c1b5b44bc0df48693f8b1f604b333bef54408c598c23bd9173b8641f102ad7f24ed7abf3316c61d0ca82cb6 airsonic.conf
1f190647bac0b09153de9121c7bb7a4d7ed316a388bbea7087f2a39d2cbe937b3b2f75c4598f887baf9110a4aa2b31745aadf1cade0dfe6a0e4d0f06b00facce airsonic.initd
cebf02fb303fa2587c35c06b86fa0235033aa991f74492ed14b8a777793ba2d832cc67fb66aab0ea5272513960314fafd217d7be32101fc47acb44ea68e03c4c airsonic.sh"

View file

@ -0,0 +1,19 @@
# Host and port to listen on
AIRSONIC_HOST=127.0.0.1
AIRSONIC_PORT=8080
# To disable https, set to 0
AIRSONIC_HTTPS_PORT=0
AIRSONIC_CONTEXT_PATH=/
AIRSONIC_MAX_MEMORY=1024
# Music directories
AIRSONIC_DEFAULT_MUSIC_FOLDER=/var/music
AIRSONIC_DEFAULT_PODCAST_FOLDER=/var/music/Podcast
AIRSONIC_DEFAULT_PLAYLIST_FOLDER=/var/playlists
NICELEVEL=0
# Further subsonic start script options, if ever needed
AIRSONIC_OPTS="

View file

@ -0,0 +1,43 @@
#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License, v2 or later
AIRSONIC_HOME=${AIRSONIC_HOME:-/var/lib/${SVCNAME}}
AIRSONIC_USER=${AIRSONIC_USER:-${SVCNAME}}
PIDFILE=/run/airsonic/airsonic.pid
depend() {
after net
}
start() {
checkpath -dq -o airsonic:airsonic -m 755 /run/airsonic/
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
--start --user "${AIRSONIC_USER}" --name airsonic \
--env HOME="${AIRSONIC_HOME}" --exec /usr/bin/airsonic \
--pidfile="${PIDFILE}" \
--nicelevel "${NICELEVEL}" \
-- \
--home="${AIRSONIC_HOME}" \
--host="${AIRSONIC_HOST}" \
--port="${AIRSONIC_PORT}" \
--https-port="${AIRSONIC_HTTPS_PORT}" \
--context-path="${AIRSONIC_CONTEXT_PATH}" \
--max-memory="${AIRSONIC_MAX_MEMORY}" \
--pidfile="${PIDFILE}" \
--default-music-folder="${AIRSONIC_DEFAULT_MUSIC_FOLDER}" \
--default-podcast-folder="${AIRSONIC_DEFAULT_PODCAST_FOLDER}" \
--default-playlist-folder="${AIRSONIC_DEFAULT_PLAYLIST_FOLDER}" \
--quiet
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --user "${AIRSONIC_USER}" \
--pidfile "${PIDFILE}" \
--wait 15000 \
--progress
eend $?
}

View file

@ -0,0 +1,135 @@
#!/bin/sh
###################################################################################
# Shell script for starting Airsonic. See http://airsonic.org.
#
# Author: Sindre Mehus
###################################################################################
AIRSONIC_HOME=/var/lib/airsonic
AIRSONIC_HOST=127.0.0.1
AIRSONIC_PORT=8080
AIRSONIC_HTTPS_PORT=0
AIRSONIC_CONTEXT_PATH=/
AIRSONIC_MAX_MEMORY=150
AIRSONIC_PIDFILE=
AIRSONIC_DEFAULT_MUSIC_FOLDER=/var/lib/media/music
AIRSONIC_DEFAULT_PODCAST_FOLDER=/var/lib/media/podcasts
AIRSONIC_DEFAULT_PLAYLIST_FOLDER=/var/lib/media/playlists
quiet=0
usage() {
echo "Usage: airsonic.sh [options]"
echo " --help This small usage guide."
echo " --home=DIR The directory where Airsonic will create files."
echo " Make sure it is writable. Default: /var/airsonic"
echo " --host=HOST The host name or IP address on which to bind Airsonic."
echo " Only relevant if you have multiple network interfaces and want"
echo " to make Airsonic available on only one of them. The default value"
echo " will bind Airsonic to all available network interfaces. Default: 0.0.0.0"
echo " --port=PORT The port on which Airsonic will listen for"
echo " incoming HTTP traffic. Default: 4040"
echo " --https-port=PORT The port on which Airsonic will listen for"
echo " incoming HTTPS traffic. Default: 0 (disabled)"
echo " --context-path=PATH The context path, i.e., the last part of the Airsonic"
echo " URL. Typically '/' or '/airsonic'. Default '/'"
echo " --max-memory=MB The memory limit (max Java heap size) in megabytes."
echo " Default: 100"
echo " --pidfile=PIDFILE Write PID to this file. Default not created."
echo " --quiet Don't print anything to standard out. Default false."
echo " --default-music-folder=DIR Configure Airsonic to use this folder for music. This option "
echo " only has effect the first time Airsonic is started. Default '/var/music'"
echo " --default-podcast-folder=DIR Configure Airsonic to use this folder for Podcasts. This option "
echo " only has effect the first time Airsonic is started. Default '/var/music/Podcast'"
echo " --default-playlist-folder=DIR Configure Airsonic to use this folder for playlists. This option "
echo " only has effect the first time Airsonic is started. Default '/var/playlists'"
exit 1
}
# Parse arguments.
while [ $# -ge 1 ]; do
case $1 in
--help)
usage
;;
--home=?*)
AIRSONIC_HOME=${1#--home=}
;;
--host=?*)
AIRSONIC_HOST=${1#--host=}
;;
--port=?*)
AIRSONIC_PORT=${1#--port=}
;;
--https-port=?*)
AIRSONIC_HTTPS_PORT=${1#--https-port=}
;;
--context-path=?*)
AIRSONIC_CONTEXT_PATH=${1#--context-path=}
;;
--max-memory=?*)
AIRSONIC_MAX_MEMORY=${1#--max-memory=}
;;
--pidfile=?*)
AIRSONIC_PIDFILE=${1#--pidfile=}
;;
--quiet)
quiet=1
;;
--default-music-folder=?*)
AIRSONIC_DEFAULT_MUSIC_FOLDER=${1#--default-music-folder=}
;;
--default-podcast-folder=?*)
AIRSONIC_DEFAULT_PODCAST_FOLDER=${1#--default-podcast-folder=}
;;
--default-playlist-folder=?*)
AIRSONIC_DEFAULT_PLAYLIST_FOLDER=${1#--default-playlist-folder=}
;;
*)
usage
;;
esac
shift
done
# Use JAVA_HOME if set, otherwise assume java is in the path.
JAVA=java
if [ -e "${JAVA_HOME}" ]
then
JAVA=${JAVA_HOME}/bin/java
fi
# Create Airsonic home directory.
mkdir -p ${AIRSONIC_HOME}
LOG=${AIRSONIC_HOME}/airsonic_sh.log
rm -f ${LOG}
cd $(dirname $0)
if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
cd $(dirname $(readlink $0))
fi
${JAVA} -Xmx${AIRSONIC_MAX_MEMORY}m \
-Dairsonic.home=${AIRSONIC_HOME} \
-Dairsonic.host=${AIRSONIC_HOST} \
-Dairsonic.port=${AIRSONIC_PORT} \
-Dairsonic.httpsPort=${AIRSONIC_HTTPS_PORT} \
-Dairsonic.contextPath=${AIRSONIC_CONTEXT_PATH} \
-Dairsonic.defaultMusicFolder=${AIRSONIC_DEFAULT_MUSIC_FOLDER} \
-Dairsonic.defaultPodcastFolder=${AIRSONIC_DEFAULT_PODCAST_FOLDER} \
-Dairsonic.defaultPlaylistFolder=${AIRSONIC_DEFAULT_PLAYLIST_FOLDER} \
-Djava.awt.headless=true \
-verbose:gc \
-jar ${AIRSONIC_HOME}/airsonic.war > ${LOG} 2>&1 &
# Write pid to pidfile if it is defined.
if [ $AIRSONIC_PIDFILE ]; then
echo $! > ${AIRSONIC_PIDFILE}
fi
if [ $quiet = 0 ]; then
echo Started Airsonic [PID $!, ${LOG}]
fi

View file

@ -0,0 +1,34 @@
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Philip Nilsson <pnilsson@nullref.se>
pkgname=alex
pkgver=3.2.6
pkgrel=0
pkgdesc='Lexical analyser generator for Haskell'
arch='x86_64'
url='https://hackage.haskell.org/package/alex'
license='BSD'
makedepends='happy ghc'
source="https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="${srcdir}/$pkgname-$pkgver"
build() {
cd "$builddir"
runghc Setup.hs configure --prefix=/usr --datasubdir="$pkgname" --enable-executable-dynamic
runghc Setup.hs build
}
package() {
cd "$builddir"
runghc Setup.hs copy --destdir="$pkgdir"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/alex/BSD3"
# Doc only contains the license
rm -rf "$pkgdir/usr/share/doc"
}
sha512sums="05b6e55e9a1c348aea599d1130780a3d2a0a7c5f1db00b2c98bd34737cac9d48842fb1b1f98947a99d99013f94e39a6ffee1af8546f02fb2d32fcf362ff0f83c alex-3.2.6.tar.gz"

View file

@ -0,0 +1,50 @@
# Maintainer: Spencer Muise <smuise@spencermuise.ca>
pkgname=calibre-web
pkgver=0.6.12
pkgrel=0
pkgdesc="Web app for browsing, reading and downloading eBooks stored in a Calibre database"
arch='noarch'
url="https://github.com/janeczku/calibre-web"
license='GPL3'
depends='
python3
py3-babel
py3-flask-babel
py3-flask-login
py3-flask-principal
py3-flask
py3-pypdf2
py3-tz
py3-requests
py3-sqlalchemy
py3-tornado
py3-wand
py3-unidecode
py3-blinker
py3-goodreads
py3-levenshtein
py3-iso639'
source="
$pkgname-$pkgver.tar.gz::https://github.com/janeczku/calibre-web/archive/${pkgver}.tar.gz
calibre-web.initd"
options=!check
prepare() {
cd $srcdir/$pkgname-$pkgver
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' cps.py
}
package() {
cd $srcdir/$pkgname-$pkgver
install -d -m 755 "${pkgdir}/usr/share/webapps/calibre-web"
cp -a "${srcdir}/$pkgname-$pkgver"/* "${pkgdir}/usr/share/webapps/calibre-web/"
rm -rf "${pkgdir}/usr/lib/calibre-web/.git"
install -D -m 644 "${srcdir}/calibre-web.initd" "${pkgdir}/etc/init.d/calibre-web"
}
sha512sums="d98ac4e8aa685d358e13fcb5a1726b169046ff5c5e3fe4dcc15ad9fefc33c368e88bd51840f793cc3334fa609414882dc6f9ff4d2282d49ac9b33fa96cb5b406 calibre-web-0.6.12.tar.gz
3daa5b02e3731ec9d57ab372d31499e4cfd5d91583a4c28a373fc2e9a4d60b5d6a6a0c83bd94e05f6b80cc2419e34f9cc4d452481d3fafb590eb223dff4835ee calibre-web.initd"

View file

@ -0,0 +1,36 @@
#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License, v2 or later
CALIBREWEB_HOME=${CALIBREWEB_HOME:-/var/lib/${SVCNAME}}
CALIBREWEB_USER=${CALIBREWEB_USER:-${SVCNAME}}
NICELEVEL=1
PIDFILE=/run/calibre-web/calibre-web.pid
depend() {
after net
}
start() {
checkpath -dq -o ${CALIBREWEB_USER}:${CALIBREWEB_USER} -m 755 /run/calibre-web/
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
--start --user "${CALIBREWEB_USER}" --name calibre-web \
--env CALIBRE_DBPATH="${CALIBREWEB_HOME}" \
--env CALIBRE_PORT=443 \
--exec /usr/share/webapps/calibre-web/cps.py \
--pidfile="${PIDFILE}" \
--nicelevel "${NICELEVEL}" \
-- \
-p /var/lib/calibre-web/app.db &
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --user "${CALIBREWEB_USER}" \
--pidfile "${PIDFILE}" \
--wait 15000 \
--progress
eend $?
}

View file

@ -0,0 +1,15 @@
[Unit]
Description=Calibre-web
[Service]
Type=simple
User=calibre-web
Group=calibre-web
ExecStart=/usr/lib/calibre-web/cps.py
WorkingDirectory=/usr/lib/calibre-web/
KillSignal=SIGINT
SendSIGHUP=yes
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1 @@
u calibre-web - "Calibre-web Server" /usr/lib/calibre-web

View file

@ -0,0 +1,2 @@
d /usr/lib/calibre-web 0755 calibre-web calibre-web
Z /usr/lib/calibre-web - calibre-web calibre-web

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname='calibre'
pkgver=4.16.0
pkgrel=0
pkgdesc="Ebook management application"
arch='x86_64'
url="https://calibre-ebook.com/"
license='GPL3'
depends='hunspell hyphen icu jxrlib libmtp libusb libwmf mathjax2 mtdev optipng podofo udisks2 ipython'
makedepends='rapydscript-ng py2-sip xdg-utils py-apsw py2-beautifulsoup4 py2-cssselect py2-css-parser py2-dateutil py2-dbus py2-dnspython py-feedparser py3-html2text py2-html5-parser py2-lxml py2-markdown py-mechanize py2-msgpack py2-netifaces py2-unrardll py2-pillow py2-psutil py2-pychm py2-pygments py2-qt5 py3-qtwebengine py2-regex py2-ipaddress python2-dev qt5-qtbase-dev'
# TODO makedepends=qt5-x11extrad
# TODO depends=qt5-svg
source="https://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz
0001-De-vendor-pychm.patch"
prepare(){
cd "$srcdir/${pkgname}-${pkgver}"
# Desktop integration (e.g. enforce arch defaults)
# Use uppercase naming scheme, don't delete config files under fakeroot.
sed -e "/import config_dir/,/os.rmdir(config_dir)/d" \
-e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \
-e "s/^Name=calibre/Name=Calibre/g" \
-i src/calibre/linux.py
# cherry-picked bits of python2-backports.functools_lru_cache
# needed for frozen builds + beautifulsoup4
# see https://github.com/kovidgoyal/calibre/commit/b177f0a1096b4fdabd8772dd9edc66662a69e683#commitcomment-33169700
rm -r src/backports
# biplist is only used on macOS + python2
rm -r src/biplist/
# devendor pychm now, from the py3 building branch:
# https://github.com/kovidgoyal/calibre/commit/959b7e3fafff5faad6ae59263f825b23c7563dd4
# patch -p1 -i ../0001-De-vendor-pychm.patch
cd resources
# Remove unneeded files
rm ${pkgname}-portable.* mozilla-ca-certs.pem
# use system mathjax
rm -r mathjax
}
build() {
cd "$srcdir/${pkgname}-${pkgver}"
LANG='en_US.UTF-8' python2 setup.py build
LANG='en_US.UTF-8' python2 setup.py gui
LANG='en_US.UTF-8' python2 setup.py mathjax --path-to-mathjax /usr/share/mathjax2 --system-mathjax
LANG='en_US.UTF-8' python2 setup.py rapydscript
}
package() {
cd "$srcdir/${pkgname}-${pkgver}"
LANG='en_US.UTF-8' python2 setup.py install \
--staging-root="${pkgdir}/usr" \
--prefix=/usr \
--no-postinstall \
--bindir=/usr/lib/calibre/bin-py2 \
--staging-bindir="${pkgdir}/usr/lib/calibre/bin-py2" \
--staging-sharedir="${srcdir}"/temp
# Compiling bytecode FS#33392
# This is kind of ugly but removes traces of the build root.
for _file in $(find "${pkgdir}"/usr/lib/ -name '*.py' -print); do
_path="$(echo ${_file} | sed "s|${pkgdir}||g")"
_destdir="$(dirname ${_path})"
python2 -m compileall -d "${_destdir}" "${_file}"
python2 -O -m compileall -d "${_destdir}" "${_file}"
done
}
sha512sums="96803578c7b609cf146571df38cd9ab75c3fcc6e8b429d7083b4383974161193d544a22c249ad3934c621823a3b1d1bd52e564c6ef70fd4012aae40a1056715b calibre-4.16.0.tar.xz
84073554f6e283bf8e336f701c92f72c57431dc34eda53ef7e4c64d6dc51291a23b362a20cc963944ee9ecf2ae0b3e8e9f1dfbdc805f32fe876e85b8410f996c 0001-De-vendor-pychm.patch"

View file

@ -0,0 +1,30 @@
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Alexander 'dma147' Mieland <dma147@linux-stats.org>
# Contributor: Simon Morgan <simon@16hz.net>
pkgname=chmlib
pkgver=0.40
pkgrel=7
pkgdesc="Library for dealing with Microsoft ITSS/CHM format files"
arch='x86_64'
url="http://www.jedrea.com/chmlib/"
license='LGPL'
depends='musl'
source="http://www.jedrea.com/chmlib/chmlib-0.40.tar.bz2"
subpackages="${pkgname}-static"
options=!check
build() {
cd "${srcdir}"/${pkgname}-${pkgver}
./configure --prefix=/usr \
--enable-examples=yes
make
}
package() {
cd "${srcdir}"/${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
}
sha512sums="3a3e151cf455b19e9e7c163a1d1e5ac52e8196f0b98f77932c72af58f3517824b9244667a18279ae754ccea784f6d6ab0c47465e74e3768ce98bb7dca0ca16e3 chmlib-0.40.tar.bz2"

View file

@ -0,0 +1,203 @@
# Maintainer: Yves G. <theYinYeti@yalis.fr>
pkgname=collabora-online-server-nodocker
pkgver=4.0.4
pkgrel=0
pkgdesc="Collabora CODE (LibreOffice Online) server for Nextcloud or ownCloud, without Docker"
arch='x86_64'
url="https://www.collaboraoffice.com/code/"
license='MPL'
provides='libreoffice libreoffice-en-US'
makedepends=(bzip2 coreutils curl fontconfig gawk grep gzip libcap sed tar util-linux xz)
# From Dockerfiles install script, minus inotify-tools+psmisc: not actually part of CODE
depends=()
source="
https://www.collaboraoffice.com/repos/CollaboraOnline/CODE/Packages
install
mkcert_example.sh
sysusers
tmpfiles
"
# From debs conffiles
backup=(
opt/collaboraoffice6.0/share/psprint/psprint.conf
etc/apache2/conf-available/loolwsd.conf
etc/loolwsd/loolkitconfig.xcu
etc/loolwsd/loolwsd.xml
etc/nginx/snippets/loolwsd.conf
etc/sysconfig/loolwsd
)
# From debs pre/post scripts
install=install
# From Dockerfile (https://github.com/CollaboraOnline/Docker-CODE), minus i18n files
_upstream_deps='loolwsd code-brand'
# DEBIANARCHLINUX EQUIVALENCES
#
# In case of a new upstream release:
#
# 1. Move all lines from $_upstream_equiv to $_upstream_equiv_OLD.
#
# 2. Run `makepkg -s` iteratively:
# * Each time a dependency is missing, move it back from $_upstream_equiv_OLD to $_upstream_equiv.
# * If a dependency is new, add a new line in $_upstream_equiv with nothing after the “=” sign.
#
# 3. When the package is done, in a terminal run: ./missing-deps.sh
#
# 4. For each “not found” line:
# * If the missing file should be provided by a new dependency in $_upstream_equiv,
# then put after the “=” sign the name of an Archlinux package that provides this file;
# you may need to create the package if it does not exist (usually old versions).
# * Else the missing file is probably expected to be present on any Debian/Ubuntu system;
# thus add the missing dependency in the $depends array.
_upstream_equiv='
adduser =
cpio = cpio
expat = expat
fontconfig = fontconfig
init-system-helpers =
libc6 = gcc-libs
libcap2 = libcap
libcap2-bin = libcap
libcups2 = libcups
libexpat1 =
libgcc1 = gcc-libs
libgl1-mesa-glx = mesa-libgl
libpam0g = pam
libpcre3 =
libpng12-0 = libpng12
libpococrypto60 = poco
libpocofoundation60 = poco
libpocojson60 = poco
libpoconet60 = poco
libpoconetssl60 = poco
libpocoutil60 = poco
libpocoxml60 = poco
libsm6 = libsm
libssl1.0.0 = openssl-1.0
libstdc++6 = gcc-libs
libxcb-render0 = libxcb
libxcb-shm0 = libxcb
libxinerama1 = libxinerama
libxrender1 = libxrender
locales-all = glibc
zlib1g = zlib
'
_upstream_equiv_OLD='
'
_upstream_handle_dep() {
local dep="$1"
local eqv="$(grep "^[[:blank:]]*$(sed 's/[.]/\\\0/g' <<<"$dep")[[:blank:]]*=" <<<"$_upstream_equiv")"
local meta="$(awk -F$'\n' -vRS= "/^Package:[[:blank:]]*$(sed 's/[.]/\\\0/g' <<<"$dep")\\n/{print}" Packages)"
local seen=
if [ -n "$eqv" ]; then
dep="$(sed 's/.*=[[:blank:]]*//' <<<"$eqv")"
[ -n "$dep" ] || return
for seen in "${depends[@]}"; do
[ "$seen" == "$dep" ] && return
done
if [[ "$dep" =~ :// ]]; then
source[${#source[*]}]="$dep"
sha1sums[${#sha1sums[*]}]="SKIP"
else
depends[${#depends[*]}]="$dep"
fi
elif [ -n "$meta" ]; then
dep="$(sed -rn "s#^Filename:[[:blank:]]*(.*/)?#${source[0]%Packages}#p" <<<"$meta")"
for seen in "${source[@]}"; do
[ "$seen" == "$dep" ] && return
done
source[${#source[*]}]="$dep"
sha1sums[${#sha1sums[*]}]="$(sed -rn "s#^SHA1:[[:blank:]]*##p" <<<"$meta")"
while read dep; do if [ -n "$dep" ]; then
_upstream_handle_dep "$dep"
fi; done < <(
sed -rn "s#^Depends:[[:blank:]]*##p" <<<"$meta" \
| sed 's#([^)]*)##g; s#[[:blank:]]*,[[:blank:]]*#\n#g'
)
else
echo "Unknown dependency: $dep" >&2; exit 1
fi
}
if [ ${#source[*]} -eq 5 ]; then
curl -s "${source[0]}" >Packages
pkgver=$(
awk -F$'\n' -vRS= '/^Package:[[:blank:]]*loolwsd\n/{print}' Packages \
| sed -n 's/^Version:[[:blank:]]*\(.*\)-.*/\1/p'
)
for dep in $_upstream_deps; do
_upstream_handle_dep "$dep"
done
fi
unset _upstream_handle_dep _upstream_equiv _upstream_deps
package() {
local data= f=
cd "$pkgdir"
for f in "$srcdir"/*.deb; do
data="$(ar t "$f" | grep ^data)"
case "$data" in
*.bz2) ar p "$f" "$data" | tar -xjf - ;;
*.gz) ar p "$f" "$data" | tar -xzf - ;;
*.xz) ar p "$f" "$data" | tar -xJf - ;;
*) echo "Unknown file format: $data" >&2; exit 1 ;;
esac
done
chown -R $(id -nu):$(id -ng) .
# /lib is deprecated
mv {lib,usr/lib}
# use systemd for user allocation
install -Dm0644 "$srcdir"/sysusers usr/lib/sysusers.d/$pkgname.conf
# replace cron with systemd
rm -rf etc/cron.d
install -Dm0644 "$srcdir"/tmpfiles usr/lib/tmpfiles.d/$pkgname.conf
# add dependency on systemd
sed -i '/^\[Unit\]/ a \
After=systemd-tmpfiles-setup.service' usr/lib/systemd/system/loolwsd.service
# keep the cert-making script from the Dockerfile for reference
install -Dm0644 "$srcdir"/mkcert_example.sh usr/share/doc/loolwsd/example.mkcert.sh
# actually provide libreoffice, without conflicting with Archlinux libreoffice
mkdir -p usr/share/applications
sed -i 's#^Exec=collaboraoffice6.0#Exec=/opt/collaboraoffice6.0/program/soffice#' \
opt/collaboraoffice6.0/share/xdg/*
ls -1 opt/collaboraoffice6.0/share/xdg \
| while read f; do
case "$f" in
base.desktop)
icon=/usr/share/loolwsd/loleaflet/dist/images/lc_basicshapes.can.svg ;;
calc.desktop)
icon=/usr/share/loolwsd/loleaflet/dist/images/x-office-spreadsheet.svg ;;
draw.desktop)
icon=/usr/share/loolwsd/loleaflet/dist/images/lc_gallery.svg ;;
impress.desktop)
icon=/usr/share/loolwsd/loleaflet/dist/images/x-office-presentation.svg ;;
math.desktop)
icon=/usr/share/loolwsd/loleaflet/dist/images/lc_symbolshapes.brace-pair.svg ;;
writer.desktop)
icon=/usr/share/loolwsd/loleaflet/dist/images/x-office-document.svg ;;
*)
icon=/usr/share/loolwsd/loleaflet/dist/images/toolbar-bg.svg ;;
esac
sed -i "s#^Icon=.*#Icon=${icon}#" opt/collaboraoffice6.0/share/xdg/"$f"
mv opt/collaboraoffice6.0/share/xdg/"$f" usr/share/applications/"collaboraoffice-$f"
done
rm -rf opt/collaboraoffice6.0/share/xdg
# https://github.com/CollaboraOnline/Docker-CODE/issues/32
[ -d etc/sysconfig ] || mkdir etc/sysconfig
echo 'SLEEPFORDEBUGGER=0' >>etc/sysconfig/loolwsd
}

View file

@ -0,0 +1,39 @@
# Maintainer: Antoine Martin <antoine.martin@pm.me>
# Based on PKGBUILD from Lukas Jirkovsky <l.jirkovsky@gmail.com>
pkgname=cuetools
pkgver=1.4.1
pkgrel=0
pkgdesc="Cue and toc file parsers and utilities"
arch='x86_64'
url="https://github.com/svend/cuetools"
#url="http://developer.berlios.de/projects/cuetools/"
license='GPL'
depends='musl'
makedepends='automake autoconf byacc flex'
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/svend/cuetools/archive/${pkgver}.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
cd "$builddir"
aclocal
autoheader
automake --force-missing --add-missing
autoconf
}
build() {
cd "$builddir"
./configure --prefix=/usr
make
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="dc81e6ec756f9d040dd913e8f340be136d68619caa24bdec21364f94b4fc0ffcbcf21325c7fd53c9230d6d70a2856b45a32c5ca7f41ec76fa47298bf226d959e cuetools-1.4.1.tar.gz"

View file

@ -0,0 +1,55 @@
# Maintainer: Antoine Martin <antoine.martin@protonmail.com>
pkgname=dam
pkgver=0.3.3
pkgrel=1
pkgdesc="A digital audio manager built very specifically for my git-annex backed music collection"
url="https://github.com/ayakael/dam"
arch="noarch"
license="GPL3"
depends="bash shntool gawk sed grep bc git-annex findutils coreutils git ffmpeg imagemagick flac p7zip sox"
makedepends="bash coreutils findutils gawk git"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/ayakael/dam"
_gittag="$pkgver"
builddir="$srcdir/$pkgname"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o dam.tar --format "tar" $_gittag
echo "Submod update"
git submodule update --init
cd bunc
echo "Submod archive"
git archive --prefix="$pkgname/bunc/" --format="tar" -o "../bunc.tar" "master"
cd ..
tar --concatenate --file dam.tar bunc.tar
gzip dam.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
cd "$builddir"
./build.sh --version $pkgver
}
package() {
cd "$builddir"
install -Dm755 ./dam "$pkgdir"/usr/bin/dam
}
sha512sums="b3359c0ca0011ac6b7142aa31d0ea38c8cb5d946dfdb2a150f51c6908e4f5ea2bb81020fe4bdd8a0693c298c0bc4ae2d3648b12360aef2b99739bc55a23aebb5 dam-0.3.3.tar.gz"

View file

@ -0,0 +1,28 @@
# Maintainer: Rysh Glene <thereisnoescape18751 at protonmail dot ch>
# Maintainer: Sibren Vasse <arch at sibrenvasse dot nl>
# Maintainer: Michał Lemke <lemke.michal@gmail.com>
pkgname=dmenu2
pkgver=0.2
pkgrel=1
pkgdesc="Fork of dmenu with many useful patches applied and additional options like screen select, dim or opacity change"
url="https://bitbucket.org/melek/dmenu2"
arch='i686 x86_64'
license='MIT GPL'
depends='libxinerama libxft'
provides=dmenu
conflicts=dmenu
source="https://bitbucket.org/melek/dmenu2/downloads/dmenu2-$pkgver.tar.gz"
build() {
cd "$srcdir/$pkgname-$pkgver"
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" PREFIX=/usr install
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
sha512sums="45815cfbe11fc9cf3b1c1523fd72eb6bc38c4cb80f53f76e747e73bb8e4370f951cc4cc8921e136cebe608918ba1462da845626bd7d994d0fa916be1068d7c99 dmenu2-0.2.tar.gz"

View file

@ -0,0 +1,35 @@
From 839ad29b16a8baf7b1470f13d7faa0ce941769b3 Mon Sep 17 00:00:00 2001
From: Jan Vorlicek <janvorli@microsoft.com>
Date: Mon, 30 Nov 2020 16:11:36 +0100
Subject: [PATCH] Fix build on Alpine edge (#45352)
The atoll definition in the pal.h was leaking into the PAL implementation and
on Alpine edge, the difference in throws() classification was causing a build
break.
---
src/coreclr/src/pal/src/include/pal/palinternal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/coreclr/src/pal/src/include/pal/palinternal.h b/src/coreclr/src/pal/src/include/pal/palinternal.h
index e73720bec73..4ad42a03a13 100644
--- a/src/coreclr/src/pal/src/include/pal/palinternal.h
+++ b/src/coreclr/src/pal/src/include/pal/palinternal.h
@@ -170,6 +170,7 @@ function_name() to call the system's implementation
#define memset DUMMY_memset
#define memmove DUMMY_memmove
#define memchr DUMMY_memchr
+#define atoll DUMMY_atoll
#define strlen DUMMY_strlen
#define stricmp DUMMY_stricmp
#define strstr DUMMY_strstr
@@ -357,6 +358,7 @@ function_name() to call the system's implementation
#undef memset
#undef memmove
#undef memchr
+#undef atoll
#undef strlen
#undef strnlen
#undef wcsnlen
--
2.30.2

View file

@ -0,0 +1,25 @@
From bc6f00bf2734cf900b456c505ae59e70bfb7bdbd Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Thu, 3 Jun 2021 18:19:15 +0000
Subject: [PATCH] Fix last version digit present on alpine non-portable build
---
eng/native/init-distro-rid.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/native/init-distro-rid.sh b/eng/native/init-distro-rid.sh
index f71aa8640b1..bef677c77d4 100644
--- a/eng/native/init-distro-rid.sh
+++ b/eng/native/init-distro-rid.sh
@@ -41,7 +41,7 @@ initNonPortableDistroRid()
# We have forced __PortableBuild=0. This is because -portablebuld
# has been passed as false.
if (( isPortable == 0 )); then
- if [ "${ID}" = "rhel" ]; then
+ if [ "${ID}" = "rhel" ] || [ "${ID}" = "alpine" ]; then
# remove the last version digit
VERSION_ID="${VERSION_ID%.*}"
fi
--
2.30.2

View file

@ -0,0 +1,30 @@
From f8861719b8a4a64df0228bb63dcec72ceb08d562 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Thu, 3 Jun 2021 20:10:24 +0000
Subject: [PATCH] Fixed problematic version of ApplicationInsights-dotnet,
pushed to v2.2.0
---
eng/Version.Details.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 0b7309c6..bc626e4b 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -73,9 +73,9 @@
<Sha>0e89c2116ad28e404ba56c14d1c3f938caa25a01</Sha>
<RepoName>clicommandlineparser</RepoName>
</Dependency>
- <Dependency Name="Microsoft.ApplicationInsights" Version="2.0.0">
+ <Dependency Name="Microsoft.ApplicationInsights" Version="2.0.0">
- <Uri>https://github.com/Microsoft/ApplicationInsights-dotnet</Uri>
+ <Uri>https://github.com/SergeyRazmyslov/ApplicationInsights-dotnet</Uri>
- <Sha>53b80940842204f78708a538628288ff5d741a1d</Sha>
+ <Sha>53b80940842204f78708a538628288ff5d741a1d</Sha>
<RepoName>application-insights</RepoName>
</Dependency>
<!-- once https://github.com/dotnet/arcade/issues/3099 is fixed this should have a coherency parent. -->
--
2.30.2

View file

@ -0,0 +1,17 @@
From 387efb0ac01e40cd85cf9f5ce770be6437265ca4 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Fri, 4 Jun 2021 13:32:53 +0000
Subject: [PATCH] FIxed Net40 location
---
src/Core/Managed/{Net40 => net40}/CorrelationHelper.cs | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/Core/Managed/{Net40 => net40}/CorrelationHelper.cs (100%)
diff --git a/src/Core/Managed/Net40/CorrelationHelper.cs b/src/Core/Managed/net40/CorrelationHelper.cs
similarity index 100%
rename from src/Core/Managed/Net40/CorrelationHelper.cs
rename to src/Core/Managed/net40/CorrelationHelper.cs
--
2.30.2

View file

@ -0,0 +1,19 @@
--- runtime.f27d33729518f5aa478aa818b7b4f54a4d50bef1.orig/src/installer/corehost/cli/apphost/static/CMakeLists.txt 2021-03-16 15:05:11.692543567 +0000
+++ runtime.f27d33729518f5aa478aa818b7b4f54a4d50bef1/src/installer/corehost/cli/apphost/static/CMakeLists.txt 2021-03-16 15:06:51.581738910 +0000
@@ -207,12 +207,12 @@ target_link_libraries(
libhostcommon
${CORECLR_LIBRARIES}
- ${ZLIB_LIBRARIES}
- ${LIBGSS}
- ${NATIVE_LIBS_EXTRA}
-
${START_WHOLE_ARCHIVE}
${RUNTIMEINFO_LIB}
${NATIVE_LIBS}
${END_WHOLE_ARCHIVE}
+
+ ${ZLIB_LIBRARIES}
+ ${LIBGSS}
+ ${NATIVE_LIBS_EXTRA}
)

View file

@ -0,0 +1,12 @@
diff -rupN sdk.51369266643769f9f0c1184e89715cd1045126d0.orig/src/Cli/dotnet/Program.cs sdk.51369266643769f9f0c1184e89715cd1045126d0/src/Cli/dotnet/Program.cs
--- sdk.51369266643769f9f0c1184e89715cd1045126d0.orig/src/Cli/dotnet/Program.cs 2021-04-15 07:25:31.290095535 +0000
+++ sdk.51369266643769f9f0c1184e89715cd1045126d0/src/Cli/dotnet/Program.cs 2021-04-15 07:27:01.742066297 +0000
@@ -187,7 +187,7 @@ namespace Microsoft.DotNet.Cli
bool generateAspNetCertificate =
environmentProvider.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", defaultValue: true);
bool telemetryOptout =
- environmentProvider.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", defaultValue: false);
+ environmentProvider.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", defaultValue: true);
bool addGlobalToolsToPath =
environmentProvider.GetEnvironmentVariableAsBool("DOTNET_ADD_GLOBAL_TOOLS_TO_PATH", defaultValue: true);
bool nologo =

View file

@ -0,0 +1,254 @@
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Kristian Mosegaard <kristian@mosen.me>
# Contributor: Max Liebkies <mail@maxliebkies.de>
# Contributor: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
_pkgbase=dotnet
pkgname=dotnet-sdk
pkgdesc='The .NET Core SDK'
pkgver=5.0.6
pkgrel=0
arch='x86_64'
url=https://www.microsoft.com/net/core
license='MIT'
makedepends='
bash
clang
cmake
git
icu-dev
inetutils-syslogd
krb5-dev
libgit2-dev
libunwind-dev
libxml2-dev
libxml2-utils
lldb-dev
llvm10-dev
lttng-ust-dev
nodejs
openssl-dev
zlib-dev
'
#depends='
# icu-libs
# krb5-libs
# libgcc
# #libgdiplus
# libintl
# libssl1.1
# libstdc++zlib
#'
subpackages="$_pkgbase-host:host $_pkgbase-runtime:runtime aspnet-runtime:aspnet_runtime:noarch netstandard-targeting-pack:netstandard_targeting_pack:noarch $_pkgbase-targeting-pack:targeting_pack aspnet-targeting-pack:aspnet_targeting_pack:noarch"
_gittag=a8f12771179965da9f48646ded87068d379563b9
_giturl=https://github.com/dotnet/source-build
source="
$_pkgbase-$pkgver.tar.gz
dotnet.sh
9999-runtime-link-order.patch
9999-sdk-telemetry-optout.patch
9999-Fix-build-on-Alpine-edge-45352.patch
9999-Fix-last-version-digit-present-on-alpine-non-portable.patch
9999-Fixed-problematic-version-of-ApplicationInsights-dot.patch
9999-fixed-net40-location.patch
https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
"
builddir="$srcdir/$_pkgbase"
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$_pkgbase/" -o $_pkgbase.tar --format "tar" $_gittag
gzip $pkgname.tar -c > "$SRCDEST"/$_pkgbase-$pkgver.tar.gz
ln -s "$SRCDEST"/$_pkgbase-$pkgver.tar.gz "$startdir"/$_pkgbase-$pkgver.tar.gz
}
prepare() {
cd "${builddir}"
msg "Settings up dotnet bootstrap"
mkdir runtime
mkdir bootstrap
bash $srcdir/dotnet-install.sh -c Current --install-dir ./
bash $srcdir/dotnet-install.sh -c 3.1 --install-dir . --runtime dotnet
patch -p1 < "${srcdir}"/9999-Fixed-problematic-version-of-ApplicationInsights-dot.patch
[ -d patches/runtime ] || mkdir patches/runtime
cp "$srcdir"/9999-runtime-link-order.patch patches/runtime/.
cp "$srcdir"/9999-Fix-build-on-Alpine-edge-45352.patch patches/runtime/.
cp "$srcdir"/9999-Fix-last-version-digit-present-on-alpine-non-portable.patch patches/runtime/.
[ -d patches/sdk ] || mkdir patches/sdk
cp "$srcdir"/9999-sdk-telemetry-optout.patch patches/sdk/.
[ -d patches/application-insights ] || mkdir patches/application-insights
cp "$srcdir"/9999-fixed-net40-location.patch patches/application-insights/.
# disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
# To simulate git directory for DARC
mkdir -p .git/objects .git/refs
echo "${_gittag}" > .git/HEAD
touch .git/patched-refs .git/index
# TODO Why does /var/build/build/apk/v3.13/main/dotnet-sdk/src/dotnet/artifacts/src/sdk.b8025906f7463b6e477893c81238dc7003b353a3/artifacts/bin/redist/Release/dotnet/artifacts/src/sdk.b8025906f7463b6e477893c81238dc7003b353a3/artifacts/bin/redist/Release/dotnet/artifacts/src/ApplicationInsights-dotnet.53b80940842204f78708a538628288ff5d741a1d/src/Core/Managed/Net40/Utils.cs not appear? It's in Shared, though.
# cp Shared/* net45/. -R
# cp Shared/* netstandard1.3/. -R
}
pkgver() {
cd "$builddir"
local _runtimever=$(xmllint --xpath "//Dependency[@Name='Microsoft.NETCore.App.Runtime.win-x64']/@Version" eng/Version.Details.xml | cut -d '=' -f 2 | sed 's/^"//; s/"$//')
local _sdkver=$(xmllint --xpath "//Dependency[@Name='Microsoft.NET.Sdk']/@Version" eng/Version.Details.xml | cut -d '=' -f 2 | sed 's/^"//; s/"$//; s/-rtm.*//; s/-servicing.*//')
echo "${_runtimever}.sdk${_sdkver##*.}"
}
build() {
cd "$builddir"
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
./build.sh \
--with-sdk ../dotnet \
/p:ArchiveDownloadedPackages=true \
/p:ContinueOnPrebuiltBaselineError=true \
/p:SkipPortableRuntimeBuild=true \
/p:SkipPrebuiltEnforcement=true \
/p:UseSystemLibraries=true \
/p:UseSystemLibunwind=true
}
package() {
depends='
dotnet-runtime
dotnet-targeting-pack
musl
libgcc
netstandard-targeting-pack
aspnet-targeting-pack
'
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$pkgdir"/usr/share/dotnet "$pkgdir"/usr/share/licenses
bsdtar -xf dotnet-sdk-*.tar.gz -C "${pkgdir}"/usr/share/dotnet/ --no-same-owner sdk templates
ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-sdk
}
host() {
pkgdesc='A generic driver for the .NET Core Command Line Interface'
depends='
gcc
musl
'
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
bsdtar -xf dotnet-sdk-*.tar.gz -C "${subpkgdir}"/usr/share/dotnet/ --no-same-owner dotnet host
bsdtar -xf dotnet-sdk-*.tar.gz -C "${subpkgdir}"/usr/share/licenses/dotnet-host/ --no-same-owner LICENSE.txt ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "${subpkgdir}"/usr/bin/dotnet
ln -s /usr/share/dotnet/host/fxr/${pkgver}/libhostfxr.so "${subpkgdir}"/usr/lib/libhostfxr.so
install -Dm 644 "${srcdir}"/dotnet.sh -t "${subpkgdir}"/etc/profile.d/
}
runtime() {
pkgdesc='The .NET Core runtime'
makedepends='
icu-dev
krb5-dev
libunwind-dev
zlib-dev
openssl-dev
'
depends='
dotnet-host
libgcc
musl
icu
krdb5-libs
libunwind
zlib
openssl
'
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
bsdtar -xf dotnet-sdk-*.tar.gz -C "${subpkgdir}"/usr/share/dotnet/ --no-same-owner shared/Microsoft.NETCore.App
ln -s dotnet-host "${subpkgdir}"/usr/share/licenses/dotnet-runtime
}
aspnet_runtime() {
pkgdesc='The ASP.NET Core runtime'
depends='dotnet-runtime'
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
bsdtar -xf dotnet-sdk-*.tar.gz -C "${subpkgdir}"/usr/share/dotnet/ --no-same-owner shared/Microsoft.AspNetCore.App
ln -s dotnet-host "${subpkgdir}"/usr/share/licenses/aspnet-runtime
}
netstandard_targeting_pack() {
pkgdesc='The .NET Standard targeting pack'
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
bsdtar -xf dotnet-sdk-*.tar.gz -C "${subpkgdir}"/usr/share/dotnet/ --no-same-owner packs/NETStandard.Library.Ref
ln -s dotnet-host "${subpkgdir}"/usr/share/licenses/netstandard-targeting-pack
}
targeting_pack() {
pkgdesc='The .NET Core targeting pack'
depends='netstandard-targeting-pack'
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
bsdtar -xf dotnet-sdk-*.tar.gz -C "${subpkgdir}"/usr/share/dotnet/ --no-same-owner packs/Microsoft.NETCore.App.Host.alpine.3.13-x64 packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "${subpkgdir}"/usr/share/licenses/dotnet-targeting-pack
}
aspnet_targeting_pack() {
pkgdesc='The ASP.NET Core targeting pack'
depends='dotnet-targeting-pack'
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
bsdtar -xf dotnet-sdk-*.tar.gz -C "${subpkgdir}"/usr/share/dotnet/ --no-same-owner packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "${subpkgdir}"/usr/share/licenses/aspnet-targeting-pack
}
# vim: ts=2 sw=2 et:
sha512sums="c53a173cdd48d2e25905cd1f15c930965df8edff311ad267144b1fcc5a9cc06e2e42c7e630f12c5c75cfff19488a9217d9fabb88ac112a0f6feed5c62ea65024 dotnet-5.0.6.tar.gz
e61b9e3e5a2305646a616d598378230c9755c5dd5363692cc363f8f4add3807563c324dd86f3a7ae9d358c82d730608e7b293935a2b6c81c0c0f62d752a0a1cf dotnet.sh
ad57d02371d351106e043fa104e31afbb0d6799e7ce0ea1a26f585abbfbab7bcba734c7e70491c4af5bfbed965a9ed3235cf4bc1019f504baf482518193b10a7 9999-runtime-link-order.patch
c96700138ea919c169c3a394f1bf9548c7f86b1ba42b193d6e7bb0a1e2bd6f7f202befbc61246a8720181cd40e1f7fa36a6c208eb19b03a23e21994136fb2507 9999-sdk-telemetry-optout.patch
025b297e81130e6f46dfa755cfd35c3756ef148a48adcc99511d95b1ec8eeede3561f31bbdf6b16cb294da3642298c9353ba07e9728c9c60fe9c3e0f2e2b4ed4 9999-Fix-build-on-Alpine-edge-45352.patch
944461da9ed50d536195ab3572b15fdfa74713344a4ca5e31bed627f09fbf328dd0d1f66599553d474e766cacdba7146c701180810383245fcdce1aba39bfef3 9999-Fix-last-version-digit-present-on-alpine-non-portable.patch
58a3e93e5fb6247569c291f86db127cbbc6cc6842eaf0973c2a211d4806f08dcabd9781b7da567088d820a337d58d6375230ade991dcc77e170266675c4a97e5 9999-Fixed-problematic-version-of-ApplicationInsights-dot.patch
0469d571d0f7634d3794761f04e1cbff9d27d642d134a11a13560574280e5cab6f366eb8820e61a449eca99470fdea8d9f6a7d97b633059b2fe25257ed1579e6 9999-fixed-net40-location.patch
ecab4809e617e9cd30940b1c1a700e16b37b5974c850a60da7f1a25bf81516850e4533ef39d2d8786381e0e4e325d3b53fbb2377ecaa6c0813bb00fc1c92b784 dotnet-install.sh"

View file

@ -0,0 +1,12 @@
# Set location for AppHost lookup
[ -z "$DOTNET_ROOT" ] && export DOTNET_ROOT=/usr/share/dotnet
# Add dotnet tools directory to PATH
DOTNET_TOOLS_PATH="$HOME/.dotnet/tools"
case "$PATH" in
*"$DOTNET_TOOLS_PATH"* ) true ;;
* ) PATH="$PATH:$DOTNET_TOOLS_PATH" ;;
esac
# Extract self-contained executables under HOME to avoid multi-user issues from using the default '/var/tmp'
[ -z "$DOTNET_BUNDLE_EXTRACT_BASE_DIR" ] && export DOTNET_BUNDLE_EXTRACT_BASE_DIR="${XDG_CACHE_HOME:-"$HOME"/.cache}/dotnet_bundle_extract"

View file

@ -0,0 +1,44 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=enchant
pkgver=1.6.0
pkgrel=13
pkgdesc="A wrapper library for generic spell checking"
url="http://www.abisource.com/enchant/"
arch="all"
license="LGPL-2.0-or-later"
subpackages="$pkgname-dev $pkgname-doc"
depends=""
makedepends="aspell-dev glib-dev dbus-glib-dev hunspell-dev gettext-dev file
bash"
source="http://www.abisource.com/downloads/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
hunspell-build-fix.patch"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
cd "$builddir"
update_config_sub
default_prepare
}
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--disable-static
make
}
check() {
cd "$builddir"/tests
./test-enchant
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="0ca1634bb783df51512df4abecc89abdadee6baf7330d6e5f90cc15d10779896a3521a1c079ecc07e4df4f7a018ce398cca9d0125a7845a314a059840ebc9137 enchant-1.6.0.tar.gz
c0b7fd8fd00a81ea2c08ea7ce2bdffa826b5a3a0c06eacb818681f0f977d8e76c69f7938c10cdf71571cd1cbbf0e576d36fc74a41755fb570e047525195aeb99 hunspell-build-fix.patch"

View file

@ -0,0 +1,14 @@
diff -ru enchant-1.6.0-orig/src/myspell/myspell_checker.cpp enchant-1.6.0/src/myspell/myspell_checker.cpp
--- enchant-1.6.0-orig/src/myspell/myspell_checker.cpp 2016-04-18 12:25:00.094614256 +0100
+++ enchant-1.6.0/src/myspell/myspell_checker.cpp 2016-04-18 12:26:09.108569576 +0100
@@ -148,6 +148,10 @@
g_iconv_close(m_translate_out);
}
+#ifndef MAXWORDLEN
+# define MAXWORDLEN 100
+#endif
+
bool
MySpellChecker::checkWord(const char *utf8Word, size_t len)
{

View file

@ -0,0 +1,48 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss-auto-refresh
pkgver=1.1
pkgrel=1
pkgdesc="Automatically refreshes FreshRSS page once in a minute when there is no activity detected."
url="https://github.com/Eisa01/FreshRSS---Auto-Refresh-Extension"
arch="noarch"
license="MIT"
depends="freshrss"
makedepends="git"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/Eisa01/FreshRSS---Auto-Refresh-Extension"
_gittag="master"
builddir="$srcdir"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o ${pkgname}-${pkgver}.tar --format "tar" $_gittag
gzip ${pkgname}-${pkgver}.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
return 0
}
package() {
cd "$builddir"
mkdir -p "${pkgdir}/usr/share/webapps/freshrss/extensions"
cp -R "${pkgname}/xExtension-AutoRefresh" "${pkgdir}/usr/share/webapps/freshrss/extensions/"
}
sha512sums="d67c224520b1702ea8671ff4d77e2f852d2fb75b581a7d50f9cdf8e99f064389ef5ac8fd4c18c077f9633fe5d051e20d44ff3615cf0dcbf7ff91105c2f12e9e0 freshrss-auto-refresh-1.1.tar.gz"

View file

@ -0,0 +1,50 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss-imageproxy
pkgver=0.5.1
pkgrel=0
pkgdesc="https://github.com/FreshRSS/Extensions/tree/master/xExtension-ImageProxy"
url="https://github.com/FreshRSS/Extensions"
arch="noarch"
license="GPL-3.0-only"
depends="freshrss"
makedepends="git"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/FreshRSS/Extensions"
_gittag="c233bf5"
builddir="$srcdir"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o ${pkgname}-${pkgver}.tar --format "tar" $_gittag
gzip ${pkgname}-${pkgver}.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
return 0
}
package() {
cd "$builddir"
mkdir -p "${pkgdir}/usr/share/webapps/freshrss/extensions"
cp -R "${pkgname}/xExtension-ImageProxy" "${pkgdir}/usr/share/webapps/freshrss/extensions/"
}
sha512sums="9b07f4050ad06ff10ad6e35bc105d4778597cc9d6ecaa033fa8b414c0f7de3c85db02b14d28503a2c5e9be205abf7c740eba804d9035ef005afc4fc407096c4f freshrss-imageproxy-0.5.1.tar.gz"

View file

@ -0,0 +1,47 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss-readingtime
pkgver=1.2
pkgrel=0
pkgdesc="Add a reading time estimation next to each article."
url="https://framagit.org/Lapineige/FreshRSS_Extension-ReadingTime"
arch="noarch"
license="MIT"
depends="freshrss"
makedepends="git"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://framagit.org/Lapineige/FreshRSS_Extension-ReadingTime"
_gittag="29a744a8"
builddir="$srcdir"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o ${pkgname}-${pkgver}.tar --format "tar" $_gittag
gzip ${pkgname}-${pkgver}.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
return 0
}
package() {
cd "$builddir"
mkdir -p "${pkgdir}/usr/share/webapps/freshrss/extensions"
cp -R "${pkgname}" "${pkgdir}/usr/share/webapps/freshrss/extensions/"
}
sha512sums="9e98586d4769892768d409ac0bf479daf1b7f52a8fa93c1303c441e936d236348f83a478b01019e05201d57b7b891659a0aefce80d9c286395214b3084cb2bc8 freshrss-readingtime-1.2.tar.gz"

View file

@ -0,0 +1,48 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss-redditimage
pkgver=0.10.0
pkgrel=0
pkgdesc="Modify reddit entries by displaying known medias and easing access to the linked resource"
url="https://github.com/aledeg/FreshRSS-extensions"
arch="noarch"
license="MIT"
depends="freshrss"
makedepends="git"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/aledeg/FreshRSS-extensions"
_gittag="2ad7def"
builddir="$srcdir"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o ${pkgname}-${pkgver}.tar --format "tar" $_gittag
gzip ${pkgname}-${pkgver}.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
return 0
}
package() {
cd "$builddir"
mkdir -p "${pkgdir}/usr/share/webapps/freshrss/extensions"
cp -R "${pkgname}/xExtension-RedditImage" "${pkgdir}/usr/share/webapps/freshrss/extensions/"
}
sha512sums="c37f90702ba8b6e70483b8f11df7b3913d4c05f396e0e312f065a55f68521c7fac1ba4bb85f3eff09d9f0e5ea1b06616a199612fee37b0fcb1846e4b0a18877a freshrss-redditimage-0.10.0.tar.gz"

View file

@ -0,0 +1,48 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss-threepanesview
pkgver=1.9
pkgrel=0
pkgdesc="Adds a third vertical pane along the articles list, to display the articles content"
url="https://framagit.org/nicofrand/xextension-threepanesview"
arch="noarch"
license="MIT"
depends="freshrss"
makedepends="git"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://framagit.org/nicofrand/xextension-threepanesview"
_gittag="01e7293e97b8ceb30b07069e2fcdb0364e11a8e0"
builddir="$srcdir"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o ${pkgname}-${pkgver}.tar --format "tar" $_gittag
gzip ${pkgname}-${pkgver}.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
return 0
}
package() {
cd "$builddir"
mkdir -p "${pkgdir}/usr/share/webapps/freshrss/extensions/xExtension-ThreePanesView"
cp -R "${pkgname}/"* "${pkgdir}/usr/share/webapps/freshrss/extensions/xExtension-ThreePanesView"
}
sha512sums="cacc888b86d23d8f0ea3e9658d04edf5cfaffde630011754d402850b82dea2368012156093de36adf463df2ba92fa513c113e5ab6a5e9e3cb14de716c4708bd2 freshrss-threepanesview-1.9.tar.gz"

View file

@ -0,0 +1,22 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss-wallabag
pkgver=0.1
pkgrel=2
pkgdesc="This FreshRSS extension adds a button to each article which adds the respective article to your Wallabag installation."
url="https://github.com/youknow0/freshrss-wallabag"
arch="noarch"
license="GAGPL-3.0-only"
depends="freshrss"
makedepends="git"
source="https://repo.groulx.xyz/src/${pkgname}-${pkgver}.tar.gz"
builddir="$srcdir"
options="!check"
package() {
cd "$builddir"
mkdir -p "${pkgdir}/usr/share/webapps/freshrss/extensions"
cp -R "${pkgname}" "${pkgdir}/usr/share/webapps/freshrss/extensions/"
}
sha512sums="6f7152f461f379c082357fa17fd4c56dd0129919d8527ffccaaeeb1bc63ec17a2c8d2a4cc9a9dd33bcc285ba3de692d534ad40867d7e0ade83aeeb0713a85d1d freshrss-wallabag-0.1.tar.gz"

View file

@ -0,0 +1,47 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss-youtube
pkgver=0.10.2
pkgrel=0
pkgdesc="Embed YouTube/PeerTube feeds inside article content."
url="https://github.com/kevinpapst/freshrss-youtube"
arch="noarch"
license="MIT"
depends="freshrss"
makedepends="git"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/kevinpapst/freshrss-youtube"
_gittag="0.10.2"
builddir="$srcdir"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o ${pkgname}-${pkgver}.tar --format "tar" $_gittag
gzip ${pkgname}-${pkgver}.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
return 0
}
package() {
cd "$builddir"
mkdir -p "${pkgdir}/usr/share/webapps/freshrss/extensions"
cp -R "${pkgname}/xExtension-YouTube" "${pkgdir}/usr/share/webapps/freshrss/extensions/"
}
sha512sums="cb6330dee43f4c7494484ed8b49047d5ea619e2eee48dc8430b8f316b1642c5f05f65e900b86a9b4d228c223b805c7d8fc1147c3cc3006ad0196834a1340cff2 freshrss-youtube-0.10.2.tar.gz"

View file

@ -0,0 +1,48 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss-youtubechannel2rssfeed
pkgver=0.2.1
pkgrel=0
pkgdesc="Transfer YouTube Channel URL into RSS Feed URL."
url="https://github.com/cn-tools/cntools_FreshRssExtensions"
arch="noarch"
license="MIT"
depends="freshrss"
makedepends="git"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/cn-tools/cntools_FreshRssExtensions"
_gittag="92f2048a9a27b7fb18054caf31ecc84d271882a0"
builddir="$srcdir"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o ${pkgname}-${pkgver}.tar --format "tar" $_gittag
gzip ${pkgname}-${pkgver}.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
return 0
}
package() {
cd "$builddir"
mkdir -p "${pkgdir}/usr/share/webapps/freshrss/extensions"
cp -R "${pkgname}/xExtension-YouTubeChannel2RssFeed" "${pkgdir}/usr/share/webapps/freshrss/extensions/"
}
sha512sums="100299ab4d9a52522dc08663157f4a0d0e95c5040fbc3ee495d2b0075c3de1b5acc741cfcb7b760767e5e701639ea41f0a85d1c2824c48f0011e3cb400781714 freshrss-youtubechannel2rssfeed-0.2.1.tar.gz"

View file

@ -0,0 +1,30 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=freshrss
pkgver=1.18.0
pkgrel=1
pkgdesc="FreshRSS is a self-hosted RSS feed aggregator"
arch='noarch'
url="http://freshrss.org"
license='AGPL'
depends='nginx php7 php7-fileinfo php7-curl php7-dom php7-xml php7-session php7-ctype php7-pdo_mysql php7-json php7-gmp php7-intl php7-mbstring php7-iconv php7-zip php7-zlib php7-idn'
source="https://github.com/FreshRSS/FreshRSS/archive/${pkgver}.zip"
builddir="${srcdir}/FreshRSS-${pkgver}"
build() {
return 0
}
package() {
cd ${builddir}
install -d "${pkgdir}/usr/share/webapps/${pkgname}"
mkdir -p "${pkgdir}/var/lib/freshrss"
cp -r ./data/. "${pkgdir}/var/lib/${pkgname}/"
cp -r . "${pkgdir}/usr/share/webapps/${pkgname}/"
rm -R "${pkgdir}/usr/share/webapps/${pkgname}/data"
ln -s "/var/lib/freshrss" "${pkgdir}/usr/share/webapps/${pkgname}/data"
chown 100:101 -R "${pkgdir}/usr/share/webapps/${pkgname}/data"
}
sha512sums="b5ac5b92e9cc4608ff6018a962e16e26bd3c2bf97c00aab992283939a3331927bea922090bc2d2e848dfa4f43a783017679d176bc708156e9d4a2b62acc5cc55 1.18.0.zip"

View file

@ -0,0 +1,161 @@
# Maintainer: Antoine Martin <antoine.martin@protonmail.com>
pkgname=git-annex
pkgver=8.20210428
pkgrel=0
pkgdesc="Manage files with git, without checking their contents into git"
url="http://git-annex.branchable.com"
arch="i686 x86_64"
license="GPL3"
depends="git lsof rsync curl gmp zlib gnupg file gnutls libxml2 openssh util-linux libidn libgsasl"
makedepends="cabal ghc zlib-dev file-dev gnutls-dev libxml2-dev libgsasl-dev ncurses-dev happy alex"
source="$pkgname-$pkgver.tar.gz"
subpackages="$pkgname-doc"
_giturl="https://git.joeyh.name/git/git-annex.git"
_gittag="$pkgver"
builddir="$srcdir/$pkgname"
# Cabal Flags:
# The git-annex assistant requires significantly more dependencies.
# If you do not need the assistant or have build issues try:
# _webapp=0
# Enable git-annex assistant and watch command
_assistant=1
# Enable git-annex webapp
_webapp=1
# Enable pairing
_pairing=1
# slower build; faster binary
_production=1
# Use haskell torrent library to parse torrent files
_torrentparser=1
# Use libmagic to determine file MIME types
_magicmime=1
# Enable benchmarking
_benchmark=1
# Debug location of MVar/STM deadlocks
_debuglocks=0
# Enable dbus support
_dbus=1
# Build with network-3.0 which split out network-bsd
_networkbsd=1
# Build with git-lfs library (rather than vendored copy)
_gitlfs=1
# Build with http-client-restricted library (rather than vendored copy)
_httpclientrestricted=1
# Cabal flags
_cabal_flags=" --force-reinstalls "
# The man page is always built but,
# building the rest of the documentation requires ikiwiki.
# If you want to build the documentation turns this to 1.
_build_docs=0
_features=""
_cabal_makedepends="c2hs cpphs"
_cabal_libdepends="exceptions hslogger async tasty filepath-bytestring split unix-compat"
gitannexfeature() {
case $1 in
(0) _features="${_features} -f-$2";;
(*) _features="${_features} -f$2";;
esac
}
gitannexfeature $_assistant Assistant
gitannexfeature $_webapp Webapp
gitannexfeature $_pairing Pairing
gitannexfeature $_production Production
gitannexfeature $_torrentparser TorrentParser
gitannexfeature $_magicmime MagicMime
gitannexfeature $_benchmark Benchmark
gitannexfeature $_debuglocks DebugLocks
gitannexfeature $_dbus Dbus
gitannexfeature $_networkbsd NetworkBSD
gitannexfeature $_gitlfs GitLfs
gitannexfeature $_httpclientrestricted HttpClientRestricted
_localize_home(){
ORIG_HOME="$HOME"
ORIG_TMPDIR="$TMPDIR"
export HOME="${srcdir}"/cabal
export TMPDIR="${srcdir}"/cabal/tmp
export PATH="$HOME/.cabal/bin:$PATH"
}
_restore_home(){
export HOME="$ORIG_HOME"
export TMPDIR="$ORIG_TMPDIR"
}
pkgver() {
cd "$srcdir/${pkgname%-git}"
git describe --long | sed 's/^v//;s/-/_/g'
}
asking() {
read -p "$@ (Y/n)" answer
case "$answer" in
n|N|no|NO|No|nO) false;;
*) true;;
esac
}
snapshot() {
mkdir -p "$srcdir"
cd "${SRCDEST:-$srcdir}"
if ! [ -d $pkgname.git ]; then
git clone --bare $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
git archive --prefix="$pkgname/" -o "$SRCDEST"/$pkgname-$pkgver.tar.gz $_gittag
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
cd "$builddir"
_localize_home
mkdir -p "$HOME" "$TMPDIR"
msg "Features: $_features"
msg "Installing missing cabal dependencies..."
cabal update
cabal install ${_cabal_makedepends}
cabal install --lib ${_cabal_libdepends}
cabal install ${_cabal_flags} --user --only-dependencies ${_features}
msg "Configuring..."
cabal configure ${_features}
msg "Starting build..."
make
_restore_home
}
check() {
cd "$builddir"
_localize_home
make test || asking "Tests failed. Continue?"
_restore_home
}
package() {
cd "$builddir"
_localize_home
make DESTDIR="$pkgdir" install
_restore_home
}
sha512sums="8d94cb3212b19da31182dc8dd2040d7518b85f3aec8bd7d6a6801670cbbd98b96695b795e105dba16cd4f56ec514badc5e00ce091e2c33db51b057b5d7fd36ff git-annex-8.20210428.tar.gz"

View file

@ -0,0 +1,58 @@
# Maintainer: Antoine Martin <antoine.martin@protonmail.com>
pkgname=grumble
pkgver=20200415
pkgrel=0
pkgdesc="Grumble is an implementation of a server for the Mumble voice chat system."
url="https://github.com/mumble-voip/grumble"
arch="x86_64"
license="custom"
makedepends="go"
source="$pkgname-$pkgver.tar.gz grumble.initd LICENSE"
_giturl="https://github.com/mumble-voip/grumble"
_gittag=6f8c2bf2f51fddc1cb09e3385bc4e9db5dc43ba9
builddir="$srcdir/$pkgname"
subpackages="$pkgname-openrc"
options="chmod-clean"
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o $pkgname.tar --format "tar" $_gittag
gzip $pkgname.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
cd "$builddir"
export GOPATH="$srcdir/go"
go get -v -t ./...
go build mumble.info/grumble/cmd/grumble
}
check() {
cd "$builddir"
export GOPATH="$srcdir/go"
go test -v ./...
}
package() {
cd "$builddir"
install -Dm755 ${srcdir}/go/bin/grumble "$pkgdir"/usr/bin/grumble
install -Dm755 ${srcdir}/grumble.initd "$pkgdir"/etc/init.d/grumble
}
sha512sums="1b4cbe4aa5a5ff5d24b7954719aa645167602a5951916d6f0e2e34a11ef76e6219f0dbb4d6cb836d4dc594b7555700ddb8fe01d4db548bffcbdf31be05c620d3 grumble-20200415.tar.gz
e04d5125646f6699354074e78f908749125c3e436507635f54ff6394957ef34b03d52fdbef1bd7e4970729034155080f9da3c4f44ebcabc9f00df6fb92fb0525 grumble.initd
63f1e396d2ef0f96135432af30d5756030aebd931fe3da143258d3ca3d949091af1e21aec157365802aa21eef2ff05b4a3ba32f42f0cfe753f88688040b8fd11 LICENSE"

View file

@ -0,0 +1,30 @@
Grumble - an implementation of Murmur in Go
Copyright (c) 2010-2020 The Grumble Authors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of the Mumble Developers nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
`AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1,26 @@
#!/sbin/openrc-run
name="Grumble"
logfile="/var/log/grumble/grumble.log"
pidfile="/run/grumble.pid"
depend() {
use net
}
start() {
ebegin "Starting grumble"
start-stop-daemon --start --background \
--user="grumble" \
--make-pidfile --pidfile="${pidfile}" \
--stdout "${logfile}" --stderr "${logfile}" \
--exec /usr/bin/env -- /usr/bin/grumble
eend $?
}
stop() {
ebegin "Stopping grumble"
start-stop-daemon --stop \
--pidfile=${pidfile} \
eend $?
}

View file

@ -0,0 +1,31 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Dziedzic <gostrc@gmail.com>
# Contributor: simo <simo@archlinux.org>
# Contributor: Vesa Kaihlavirta <vegai@iki.fi>
pkgname=happy
pkgver=1.20.0
pkgrel=0
pkgdesc="The Parser Generator for Haskell"
url="https://hackage.haskell.org/package/happy"
arch='x86_64'
options=!check
makedepends="ghc ghc-dev"
license="custom:BSD2"
source="https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
--ghc-option='-dynload=deploy' --prefix=/usr --datasubdir="$pkgname"
runhaskell Setup build
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
runhaskell Setup copy --destdir="${pkgdir}"
rm -r "$pkgdir/usr/share/doc"
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
sha512sums="2c19e6e13032ead435495aab232192cf0ad9fe5e3e04c79b40b586272fb0208284815cf5c15d609f75387e7fe91ca0932b675bcaa95552f62ad08a12701649ce happy-1.20.0.tar.gz"

View file

@ -0,0 +1,50 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=haproxy-wi
pkgver=4.5.9
pkgrel=2
pkgdesc="Web interface for managing HAProxy, Nginx and Keepalived servers"
arch='noarch'
url="https://github.com/Aidaho12/haproxy-wi"
license='Apache-2.0'
makedepends='git'
depends="net-tools lshw dos2unix nginx
py3-pip freetype-dev netcat-openbsd python3
py3-ldap3 python3-dev libpq libxml2-dev libxslt-dev libldap
libsasl libffi-dev pkgconfig nmap"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/Aidaho12/haproxy-wi"
_gittag="7c575fe0f8676c47f913bfe47166088ad3740a2b"
builddir="$srcdir/$pkgname"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o $pkgname.tar --format "tar" $_gittag
gzip $pkgname.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
package() {
_instdir="$pkgdir"/usr/share/webapps/haproxy-wi
mkdir -p "${_instdir}"
cd "${_instdir}"
cp -ra "$builddir"/* .
chmod +x app/*.py
install -Dm755 -d "${_instdir}"/app/certs "${_instdir}"/keys "${_instdir}"/log "${pkgdir}"/etc/logrotate.d
cp "${_instdir}"/config_other/logrotate/* "${pkgdir}"/etc/logrotate.d/.
}
sha512sums="7d8462de5cebe3c9f60378261a2508a5f3cbf99fc55e8ebd38adb4690659a57387614e45f2f29f9c7f486314b0bceea80591d334cf6cef24b8ea56e941a05905 haproxy-wi-4.5.9.tar.gz"

View file

@ -0,0 +1,42 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
_hkgname=polyparse
pkgname=haskell-polyparse
pkgver=1.13
pkgrel=0
pkgdesc="A variety of alternative parser combinator libraries."
url="http://code.haskell.org/~malcolm/polyparse/"
license="LGPL"
arch='x86_64'
makedepends='ghc'
source="https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
prepare() {
cd $_hkgname-$pkgver
sed -i 's/< *4.14/<5/' $_hkgname.cabal
}
build() {
cd $srcdir/$_hkgname-$pkgver
runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
--prefix=/usr --docdir=/usr/share/doc/$pkgname \
--dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
runhaskell Setup build $MAKEFLAGS
runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script
sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
package() {
cd $srcdir/$_hkgname-$pkgver
install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
runhaskell Setup copy --destdir="$pkgdir"
install -D -m644 "COPYRIGHT" "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"
rm -f "${pkgdir}/usr/share/doc/${pkgname}/COPYRIGHT"
}
sha512sums="3b66a73f97d6b5b6628193f87cae1ae1a68d63df0058532b2ac9a62af82dabe28e15fe1464075a2f436e70a7d20b57e72fdd7831f8b11035ff8117becb08d18e polyparse-1.13.tar.gz"

View file

@ -0,0 +1,36 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
_hkgname=cpphs
pkgname=haskell-cpphs
pkgver=1.20.9.1
pkgrel=0
pkgdesc="A liberalised re-implementation of cpp, the C pre-processor."
url="https://projects.haskell.org/cpphs/"
license="LGPL"
arch='x86_64'
depends='haskell-polyparse'
makedepends='ghc haskell-polyparse'
source="https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
build() {
cd $srcdir/$_hkgname-$pkgver
runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
--prefix=/usr --docdir=/usr/share/doc/$pkgname \
--dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
runhaskell Setup build $MAKEFLAGS
runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script
sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
package() {
cd $srcdir/$_hkgname-$pkgver
install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
runhaskell Setup copy --destdir="$pkgdir"
}
sha512sums="bc5cd86c1e42061ae5c940612542dbea420344fb8596495d71ff2dc724bc1a3785f830e51c3ae99394488a122deabacd6433a5c919e3682c4129f3b296b7931f cpphs-1.20.9.1.tar.gz"

View file

@ -0,0 +1,42 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
_hkgname=polyparse
pkgname=haskell-polyparse
pkgver=1.13
pkgrel=0
pkgdesc="A variety of alternative parser combinator libraries."
url="http://code.haskell.org/~malcolm/polyparse/"
license="LGPL"
arch='x86_64'
makedepends='ghc'
source="https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
prepare() {
cd $_hkgname-$pkgver
sed -i 's/< *4.14/<5/' $_hkgname.cabal
}
build() {
cd $srcdir/$_hkgname-$pkgver
runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
--prefix=/usr --docdir=/usr/share/doc/$pkgname \
--dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
runhaskell Setup build $MAKEFLAGS
runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script
sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
package() {
cd $srcdir/$_hkgname-$pkgver
install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
runhaskell Setup copy --destdir="$pkgdir"
install -D -m644 "COPYRIGHT" "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"
rm -f "${pkgdir}/usr/share/doc/${pkgname}/COPYRIGHT"
}
sha512sums="3b66a73f97d6b5b6628193f87cae1ae1a68d63df0058532b2ac9a62af82dabe28e15fe1464075a2f436e70a7d20b57e72fdd7831f8b11035ff8117becb08d18e polyparse-1.13.tar.gz"

View file

@ -0,0 +1,53 @@
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Antonio Rojas <arojas@archlinux.org>
pkgname=jxrlib
pkgver=0.2.1
pkgrel=1
pkgdesc="Open source implementation of jpegxr"
arch='x86_64'
url="https://archive.codeplex.com/?p=jxrlib"
license='GPL'
depends='musl openjdk9-jre'
makedepends='cmake swig maven openjdk9-jdk'
source="$pkgname-$pkgver.tar.gz::https://github.com/glencoesoftware/jxrlib/archive/v$pkgver.tar.gz
CMakeLists.txt"
options=!check
prepare() {
cp $srcdir/CMakeLists.txt $srcdir/$pkgname-$pkgver/
}
build() {
# Generate jni files
cd $srcdir/$pkgname-$pkgver/java
mkdir -p target/swig/ome/jxrlib
swig -java -c++ -package ome.jxrlib -outdir target/swig/ome/jxrlib -o target/swig/JXR_wrap.cxx JXR.i
# Build source
mkdir -p ../build
cd ../build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release
make
# Compile java library
cd ../java
mvn install -DskipTests
}
package() {
cd $srcdir/$pkgname-$pkgver/build
make DESTDIR="$pkgdir" install
cd ../java/target
install -Dm 644 $pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$pkgname-$pkgver.jar
}
sha512sums="bcf69c9bec32829c266e60540fdc2e8d16d9bf7e0d3930327db5bfce6d1fc2c8b67c7a2b236d128ff3ce89b1c2a14b27a69cdf5bda365c4fcaac98d76b8bd406 jxrlib-0.2.1.tar.gz
afa858b149283c63dbde69463b04297cd25c747839687e5b19d8ab0003eaf86effb5fca08e0e6cbe3cafd29d4bf5d8287240ca9216f29feb3cfdf4a994597dbb CMakeLists.txt"

View file

@ -0,0 +1,93 @@
cmake_minimum_required(VERSION 2.8)
project(jxrlib C CXX)
set(JXRLIB_MAJOR 0)
set(JXRLIB_MINOR 0)
set(JXRLIB_LIB_VERSION ${JXRLIB_MAJOR}.${JXRLIB_MINOR}.0)
set(JXRLIB_SO_VERSION ${JXRLIB_MAJOR})
#find_package(JNI)
#if (JNI_FOUND)
# message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
# message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
# message (STATUS "JAVA_INCLUDE_PATH=${JAVA_INCLUDE_PATH}")
# message (STATUS "JAVA_INCLUDE_PATH2=${JAVA_INCLUDE_PATH2}")
#endif()
#INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})
#INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH2})
include(TestBigEndian)
test_big_endian(ISBIGENDIAN)
if(ISBIGENDIAN)
set(DEF_ENDIAN -D_BIG__ENDIAN_)
endif()
add_definitions(-D__ANSI__ -DDISABLE_PERF_MEASUREMENT ${DEF_ENDIAN})
include_directories(
common/include
image/sys
jxrgluelib
jxrtestlib
)
# JXR Library
file(GLOB jpegxr_SRC image/sys/*.c image/decode/*.c image/encode/*.c)
file(GLOB jpegxr_HDR image/sys/*.h image/decode/*.h image/encode/*.h)
add_library(jpegxr SHARED ${jpegxr_SRC} ${jpegxr_HDR})
set_target_properties(jpegxr PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
install(TARGETS jpegxr
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
# JXR-GLUE Library
file(GLOB jxrglue_SRC jxrgluelib/*.c jxrtestlib/*.c)
file(GLOB jxrglue_HDR jxrgluelib/*.h jxrtestlib/*.h)
add_library(jxrglue SHARED ${jxrglue_SRC} ${jxrglue_HDR})
set_target_properties(jxrglue PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
target_link_libraries(jxrglue jpegxr m)
install(TARGETS jxrglue
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
# JXR-JAVA Library
#file(GLOB jxrjava_SRC java/target/swig/JXR_wrap.cxx cpp/lib/*.cpp)
#file(GLOB jxrjava_SRC cpp/lib/*.hpp)
#add_library(jxrjava SHARED ${jxrjava_SRC} ${jxrjava_HDR})
#set_target_properties(jxrjava PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
#target_link_libraries(jxrjava jpegxr m)
#install(TARGETS jxrjava
# RUNTIME DESTINATION bin
# LIBRARY DESTINATION lib${LIB_SUFFIX}
# ARCHIVE DESTINATION lib${LIB_SUFFIX}
#)
# JxrEncApp Executable
add_executable(JxrEncApp jxrencoderdecoder/JxrEncApp.c)
target_link_libraries(JxrEncApp jxrglue)
install(TARGETS JxrEncApp RUNTIME DESTINATION bin)
# JxrDecApp Executable
add_executable(JxrDecApp jxrencoderdecoder/JxrDecApp.c)
target_link_libraries(JxrDecApp jxrglue)
install(TARGETS JxrDecApp RUNTIME DESTINATION bin)
# Headers
install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h image/sys/windowsmediaphoto.h
DESTINATION include/jxrlib
)
install(DIRECTORY common/include/ DESTINATION include/jxrlib
FILES_MATCHING PATTERN "*.h"
)

View file

@ -0,0 +1,36 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=libpqxx
pkgver=6.4.5
pkgrel=2
pkgdesc='C++ client API for PostgreSQL'
url='http://pqxx.org/development/libpqxx/'
arch=''x86_64''
license='custom'
depends='postgresql-libs>=9.1'
makedepends='python2 xmlto doxygen postgresql-dev'
provides='libpqxx.so'
subpackages="$pkgname-doc"
source="https://github.com/jtv/libpqxx/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
prepare() {
cd $srcdir/${pkgname}-${pkgver}
sed 's|python|python2|' -i tools/splitconfig
}
build() {
cd $srcdir/${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--enable-shared
make
}
package() {
cd $srcdir/${pkgname}-${pkgver}
make prefix="${pkgdir}/usr" install
install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}
sha512sums="b6f79c4af93876eaf859626c2deae3b23bd4fa1a438390bc01513ccc48b90565d59588f6977e7475bb7b8dbeb8b1c8ef2a4737d8eb4d15682531fbf78590ed5e libpqxx-6.4.5.tar.gz"

View file

@ -0,0 +1,23 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=libyaml
pkgver=0.2.5
pkgrel=0
pkgdesc="YAML 1.1 library"
arch='x86_64'
url="https://pyyaml.org/wiki/LibYAML"
license='MIT'
source="https://pyyaml.org/download/libyaml/yaml-$pkgver.tar.gz"
build() {
cd "$srcdir/yaml-$pkgver"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/yaml-$pkgver"
make DESTDIR="$pkgdir" install
install -Dm644 License "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
sha512sums="dadd7d8e0d88b5ebab005e5d521d56d541580198aa497370966b98c904586e642a1cd4f3881094eb57624f218d50db77417bbfd0ffdce50340f011e35e8c4c02 yaml-0.2.5.tar.gz"

View file

@ -0,0 +1,100 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=logitechmediaserver
pkgver=7.9.2
_pkgver=$pkgver.arch2
pkgrel=6
pkgdesc='Slimserver for Logitech Squeezebox players. This server is also called Logitech Media Server.'
arch='i686 x86_64 arm armv6h armv7h aarch64'
url='https://github.com/stefansielaff/slimserver'
license='GPL custom'
depends='perl>=5.26
perl-anyevent
perl-archive-zip
perl-cgi
perl-common-sense
perl-data-dump
perl-dbd-mysql
perl-dbd-sqlite
perl-dbi
perl-digest-sha1
perl-ev
perl-html-form
perl-html-parser
perl-html-tree
perl-http-cookies
perl-http-daemon
perl-http-date
perl-http-message
perl-json-xs
perl-log-log4perl
perl-lwp-mediatypes
perl-lwp-protocol-https
perl-module-build
perl-net-ipv4addr
perl-path-class
perl-soap-lite
perl-readonly
perl-sub-name
perl-sub-uplevel
perl-template-toolkit
perl-test-nowarnings
perl-test-warn
perl-text-glob
perl-uri
perl-xml-parser
perl-xml-simple
perl-io-socket-ssl
perl-yaml-libyaml
ffmpeg giflib libexif libjpeg-turbo libpng'
makedepends='nasm yasm rsync gd-dev zlib-dev libpng-dev libjpeg-turbo-dev perl-dev'
install="$pkgname.post-deinstall $pkgname.post-upgrade $pkgname.post-install"
source="slimserver-${_pkgver}.tar.gz::${url}/archive/${_pkgver}.tar.gz
slimserver-vendor-${_pkgver}.tar.gz::${url}-vendor/archive/${_pkgver}.tar.gz
logitechmediaserver.initd
logitechmediaserver.conf"
options="!check"
prepare() {
cd "${srcdir}/slimserver-${_pkgver}"
case $CARCH in
x86_64) rm -rf Bin/arm-linux Bin/armhf-linux Bin/aarch64-linux ;;
i686) rm -rf Bin/arm-linux Bin/armhf-linux Bin/aarch64-linux ;;
aarch64) rm -rf Bin/i386-linux Bin/x86_64-linux Bin/arm-linux Bin/armhf-linux ;;
arm*) rm -rf Bin/i386-linux Bin/x86_64-linux Bin/aarch64-linux ;;
esac
cd "${srcdir}/slimserver-${_pkgver}/CPAN"
mkdir _PRESERVE
cp -p --parents URI/Find.pm _PRESERVE
cp -pr --parents Net/UPnP* _PRESERVE
rm -f AE.pm AnyEvent.pm CGI.pm DBI.pm Error.pm EV.pm JSON/XS.pm LWP.pm Readonly.pm Template.pm Text/Glob.pm URI.pm version.pm
rm -rf AnyEvent Archive CGI common DBI DBD Digest EV HTML HTTP I18N Mac Log LWP Net Path SOAP Sub Template Test URI version XML YAML
cp -rf _PRESERVE/* .
rm -rf _PRESERVE
}
build() {
cd "${srcdir}/slimserver-vendor-${_pkgver}/CPAN"
sh buildme.sh -t
}
package() {
cd "${srcdir}"
install -Dm755 $srcdir/logitechmediaserver.initd $pkgdir/etc/init.d/logitechmediaserver
install -Dm644 $srcdir/logitechmediaserver.conf $pkgdir/etc/conf.d/logitechmediaserver
cd "${srcdir}/slimserver-${_pkgver}"
install -d "${pkgdir}"/usr/share/webapps/"${pkgname}"
install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
install -d "${pkgdir}"/usr/bin
ln -s "/usr/share/webapps/${pkgname}/License.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cp -a * "${pkgdir}/usr/share/webapps/${pkgname}"
cd "${srcdir}/slimserver-vendor-${_pkgver}"
cp -a CPAN/build/5.*/lib/*/*linux*/* "${pkgdir}/usr/share/webapps/${pkgname}/CPAN"
printf "ARCH-AUR-REL.%s\n%s" "${_pkgver}" "$(date)" > "${pkgdir}/usr/share/webapps/${pkgname}/revision.txt"
ln -s /usr/share/webapps/logitechmediaserver/slimserver.pl "${pkgdir}/usr/bin/logitechmediaserver"
}
sha512sums="034a4d7330c4de502d41f5048d95afb678bdbdb49cde83316dd51ffedf754cdb9a588295b21a5a4532f1ecda35bfca35ba18c88d433ec0b7ade964c38d1cdd9d slimserver-7.9.2.arch2.tar.gz
3c5b0220cf0f53bdda8d08269a9a715c211e79dfa228ad175f251dcb429479b96e936a5c3fc337c4b9b03f859b8c5c502bb979a3bd96621c7393407ecffb0179 slimserver-vendor-7.9.2.arch2.tar.gz
e643b30445e92ad759d2073658468fd6ce791cf29e0af41cd0abd47574be03d6c6c40d5222432b07ec2a1ea834c4b02cad66e6e64e23988ba5050febf9f40882 logitechmediaserver.initd
9746ed4fd155b7550cfc235a6b92ed1c697cb503039eb35ebfc50c1f35fe413223bcdb49e611d92158e31f8d1d08cc707fcd15ba778e923734db17190971574c logitechmediaserver.conf"

View file

@ -0,0 +1,4 @@
NICELEVEL=0
# Further subsonic start script options, if ever needed
LOGITECHMS_OPT="

View file

@ -0,0 +1,36 @@
#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License, v2 or later
LOGITECHMS_HOME=${LOGITECHMS_HOME:-/var/lib/${SVCNAME}}
LOGITECHMS_USER=${LOGITECHMS_USER:-${SVCNAME}}
PIDFILE=/run/logitechmediaserver/logitechmediaserver.pid
depend() {
after net
}
start() {
checkpath -dq -o ${LOGITECHMS_USER}:${LOGITECHMS_USER} -m 755 /run/logitechmediaserver/
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
--start --user "${LOGITECHMS_USER}" --name logitechmediaserver \
--env HOME="${LOGITECHMS_HOME}" --exec /usr/bin/logitechmediaserver \
--pidfile="${PIDFILE}" \
--nicelevel "${NICELEVEL}" \
-- \
--prefsdir=${LOGITECHMS_HOME}/prefs \
--cachedir=${LOGITECHMS_HOME}/cache \
--logdir=${LOGITECHMS_HOME}/Logs \
--noimage --novideo
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --user "${LOGITECHMS_USER}" \
--pidfile "${PIDFILE}" \
--wait 15000 \
--progress
eend $?
}

View file

@ -0,0 +1,6 @@
#!/bin/sh
getent passwd logitechmediaserver &>/dev/null && userdel logitechmediaserver >/dev/null
getent group logitechmediaserver &>/dev/null && groupdel logitechmediaserver >/dev/null || true
exit 0

View file

@ -0,0 +1,9 @@
#!/bin/sh
getent group logitechmediaserver &>/dev/null || groupadd -r logitechmediaserver >/dev/null
getent passwd logitechmediaserver &>/dev/null || useradd -r -g logitechmediaserver -d /usr/share/webapps/logitechmediaserver -c 'Logitech Media Server' -s /bin/false logitechmediaserver >/dev/null
mkdir -p /var/lib/logitechmediaserver/cache /var/lib/logitechmediaserver/Logs /var/lib/logitechmediaserver/prefs /var/lib/logitechmediaserver/prefs/plugin /var/lib/logitechmediaserver/Plugins
touch /var/lib/logitechmediaserver/Logs/slimserver.log
chown -R logitechmediaserver:logitechmediaserver /var/lib/logitechmediaserver
exit 0

View file

@ -0,0 +1,7 @@
#!/bin/sh
mkdir -p /var/lib/logitechmediaserver/cache /var/lib/logitechmediaserver/Logs /var/lib/logitechmediaserver/prefs /var/lib/logitechmediaserver/prefs/plugin /var/lib/logitechmediaserver/Plugins
touch /var/lib/logitechmediaserver/Logs/slimserver.log
chown -R logitechmediaserver:logitechmediaserver /var/lib/logitechmediaserver
exit 0

View file

@ -0,0 +1,36 @@
# Contributor: Sasha Gerrand <alpine-pkgs@sgerrand.com>
# Maintainer: Sasha Gerrand <alpine-pkgs@sgerrand.com>
pkgname=lzop
pkgver=1.04
pkgrel=0
pkgdesc="lzop is a very fast file compressor"
url="https://www.lzop.org/"
arch="all"
license="GPL-2.0-only"
makedepends="lzo-dev"
subpackages="$pkgname-doc"
source="https://www.lzop.org/download/lzop-$pkgver.tar.gz"
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var
make
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="5829b4495ffefab549aa697a05c536ce593c572c9eee6004460583a0090abcd317c6074c4f981dfee6be61ac8d127f02dd37053b6cb782af64db41586a8bbb6e lzop-1.04.tar.gz"

View file

@ -0,0 +1,22 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=mariadb-connector-j
pkgver=2.7.1
pkgrel=1
pkgdesc="The official Java library (Connector/J) to connect to MariaDB and MySQL"
arch='noarch'
url="https://downloads.mariadb.org/connector-java/"
license='LGPL2.1'
option="!nocheck"
depends='openjdk8-jre'
source="https://downloads.mariadb.com/Connectors/java/connector-java-${pkgver}/mariadb-java-client-${pkgver}.jar"
package() {
install -D -m755 \
"${srcdir}/mariadb-java-client-${pkgver}.jar" \
"${pkgdir}/usr/share/java/${pkgname}/mariadb-java-client-${pkgver}.jar"
ln -s "/usr/share/java/${pkgname}/mariadb-java-client-${pkgver}.jar" \
"${pkgdir}/usr/share/java/${pkgname}/mariadb-java-client.jar"
}
sha512sums="95ab41f1935a58c70da22083d2f100e187f5c2c6c304b807a7979297bbe24b1bea8ecbe68948d5ae454ad762e30dbbedb87726b0ea9bc4526a908e00221d6c5b mariadb-java-client-2.7.1.jar"

View file

@ -0,0 +1,93 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=mastodon
pkgver=3.3.0
pkgrel=9
pkgdesc='Self-hosted social media and network server based on ActivityPub and OStatus'
arch='x86_64'
url=https://github.com/tootsuite/mastodon
license='AGPL3'
depends='ffmpeg
imagemagick
libidn
libpqxx
libxml2
libxslt
libyaml
icu-libs
libpq
libressl
nodejs
nodejs-npm
postgresql
redis
ruby
ruby-bundler
protobuf
yarn
gnu-libiconv
zlib
ruby-bigdecimal
ruby-io-console
ruby-irb
ruby-json
gcompat
ruby-etc'
makedepends='git libffi-dev ruby-rdoc ruby-dev icu-dev protobuf-dev libidn-dev openssl-dev postgresql-dev libxml2-dev libxslt-dev'
install="$pkgname.post-install $pkgname.post-upgrade"
source="mastodon-$pkgver.tar.gz::https://github.com/tootsuite/mastodon/archive/v$pkgver.tar.gz mastodon-web.initd mastodon-sidekiq.initd mastodon-streaming.initd"
subpackages="$pkgname-openrc"
options="!check"
prepare() {
cd "$srcdir"/mastodon-$pkgver
# Allow use of any bundler
sed -i -e '/BUNDLED/,+1d' Gemfile.lock
# Allow use of higher Node versions
sed -i 's/"node": .*"/"node": ">=14.15"/' package.json
}
build() {
cd "$srcdir"/mastodon-$pkgver
bundle config set deployment 'true'
bundle config set without 'development test'
bundle config build.nokogiri --use-system-libraries --with-iconv-lib=/usr/lib --with-iconv-include=/usr/include
bundle install -j$(getconf _NPROCESSORS_ONLN)
yarn install --pure-lockfile --ignore-engines
# RAILS_ENV='production' OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder bundle exec rails assets:precompile
}
package() {
cd "$srcdir"/mastodon-$pkgver/dist
# Fix path discrepancies
for f in mastodon-*.service; do
sed -e '0,/home/s/home/var\/lib/' \
-e 's/\/live//' \
-e 's/=\/usr\/bin/=\/var\/lib\/mastodon/' \
-e 's/home\/mastodon\/.rbenv\/shims/usr\/bin/' \
-i $f
done
install -d "$pkgdir"/usr/share/webapps
install -d "$pkgdir"/etc
cp -a "$srcdir"/mastodon-$pkgver "$pkgdir"/usr/share/webapps/mastodon
# Put the config file in /etc and link to it
touch "$pkgdir"/etc/mastodon.conf
ln -s /etc/mastodon.conf "$pkgdir"/usr/share/webapps/mastodon/.env.production
ln -s /usr/bin/node "$pkgdir"/usr/share/webapps/mastodon/node
install -Dm 755 "$srcdir"/mastodon-web.initd "$pkgdir"/etc/init.d/mastodon-web
install -Dm 755 "$srcdir"/mastodon-streaming.initd "$pkgdir"/etc/init.d/mastodon-streaming
install -Dm 755 "$srcdir"/mastodon-sidekiq.initd "$pkgdir"/etc/init.d/mastodon-sidekiq
}
sha512sums="98abde15d7b547f5aa913810a7b743bef181d74b163747fb18096fe82c4f6d0f24b223dd433a7edc4edf3cd08c0c3c9ad7eaceaa96f1a85709825382fee67314 mastodon-3.3.0.tar.gz
9e77061fbdebe90492398f8089a7d2612ff4b6e70b5462dd67330b66d9788cb0133eab38c372b1f27a7214aacdd9f7f70381d4ecc6e92c8c38d794404ae0f840 mastodon-web.initd
06ebff4b4f51e0c7122db9ed175958fbcadf7e25d1d33c4cfd43992865b1ba183dbe6b4c8c244575f30a45a72d7d4ea3d887c597060e9cf2203bb00ae1a7ac79 mastodon-sidekiq.initd
eb8af0188c49b3507f9eedf54baf9d848f11288ce475963bde70686a1e5ff8960d32560771479651597703728bf0c8663a7bd068ccd8d32b620eba442a9a8ff1 mastodon-streaming.initd"

View file

@ -0,0 +1,32 @@
#!/sbin/openrc-run
name="Mastodon background workers Service"
root="/usr/share/webapps/mastodon"
pidfile="/run/mastodon-sidekiq.pid"
logfile="/var/log/mastodon/sidekiq.log"
depend() {
use net
need redis
}
start() {
ebegin "Starting Mastodon background workers"
cd $root
start-stop-daemon --start --background \
--chdir "${root}" \
--user="mastodon" \
--make-pidfile --pidfile="${pidfile}" \
-1 "${logfile}" -2 "${logfile}" \
--exec /usr/bin/env -- RAILS_ENV=production DB_POOL=5 bundle exec sidekiq -c 5 -q default -q mailers -q pull -q push
eend $?
}
stop() {
ebegin "Stopping Mastodon background workers"
start-stop-daemon --stop \
--pidfile=${pidfile} \
eend $?
}

View file

@ -0,0 +1,33 @@
#!/sbin/openrc-run
name="Mastodon streaming API service"
root="/usr/share/webapps/mastodon"
pidfile="/run/mastodon-streaming.pid"
logfile="/var/log/mastodon/streaming.log"
depend() {
use net
}
start() {
ebegin "Starting Mastodon streaming API"
cd $root
start-stop-daemon --start \
--background --quiet \
--chdir "${root}" \
--user="mastodon" \
--make-pidfile --pidfile="${pidfile}" \
--stdout "${logfile}" --stderr "${logfile}" \
--exec /usr/bin/env -- NODE_ENV=production PORT=4000 /usr/bin/npm run start
eend $?
}
stop() {
ebegin "Stopping Mastodon streaming API"
start-stop-daemon --stop \
--pidfile="${pidfile}" \
eend $?
}

View file

@ -0,0 +1,29 @@
#!/sbin/openrc-run
name="Mastodon Web Service"
root="/usr/share/webapps/mastodon"
pidfile="/run/mastodon-web.pid"
logfile="/var/log/mastodon/web.log"
depend() {
use net
}
start() {
ebegin "Starting Mastodon web workers"
cd $root
start-stop-daemon --start --background \
--chdir "${root}" \
--user="mastodon" \
--pidfile="${pidfile}" --make-pidfile \
--stdout="${logfile}" --stderr="${logfile}" \
--exec /usr/bin/env -- RAILS_ENV=production PORT=3000 bundle exec puma -C config/puma.rb
eend $?
}
stop() {
ebegin "Stopping Mastodon web workers"
start-stop-daemon --stop \
--pidfile=${pidfile} \
eend $?
}

View file

@ -0,0 +1,9 @@
echo "To setup Mastodon, enable and start PostgreSQL and Redis:
# systemctl enable --now postgresql redis
Create the Mastodon PostgreSQL user and grant it the ability to create databases with:
# su - postgres -s /bin/sh -c \"createuser -d mastodon\"
Then, run:
# su - mastodon -s /bin/sh -c \"cd '/var/lib/mastodon'; RAILS_ENV=production bundle exec rails mastodon:setup\"
Finally, enable and start all the required services:
# systemctl enable --now mastodon.target"

View file

@ -0,0 +1,5 @@
echo "To upgrade the database schema, run:
# su - mastodon -s /bin/sh -c \"RAILS_ENV=production bundle exec rails db:migrate\"
To pre-compile assets, run:
# su - mastodon -s /bin/sh -c \"RAILS_ENV=production bundle exec rails assets:precompile\""

View file

@ -0,0 +1,35 @@
# $Id: PKGBUILD 362427 2018-07-19 17:42:59Z arojas $
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Kevin Dodd <jesin00@gmail.com>
# Contributor: Tianjiao Yin <ytj000@gmail.com>
pkgname=mathjax2
pkgver=2.7.9
pkgrel=0
pkgdesc='An open source JavaScript display engine for mathematics that works in all modern browsers'
url='https://www.mathjax.org/'
arch=noarch
license=Apache
source="$pkgname-$pkgver.tar.gz::https://github.com/mathjax/MathJax/archive/$pkgver.tar.gz"
options=!check
prepare() {
cd $srcdir/MathJax-$pkgver
# Remove unneeded stuff, see https://github.com/mathjax/MathJax-docs/wiki/Guide%3A-reducing-size-of-a-mathjax-installation
rm -r docs test unpacked
rm -r fonts/HTML-CSS/TeX/png
for _format in eot otf svg ; do
find . -type d -name "$_format" -prune -exec rm -rf {} \;
done
}
package() {
cd ${srcdir}
mkdir -p "$pkgdir"/usr/share/fonts "$pkgdir"/usr/share/licenses/mathjax2
cp -a MathJax-$pkgver "$pkgdir"/usr/share/mathjax2
mv "$pkgdir"/usr/share/mathjax2/fonts "$pkgdir"/usr/share/fonts/mathjax2
ln -s /usr/share/fonts/mathjax2 "$pkgdir"/usr/share/mathjax2/fonts
mv "$pkgdir"/usr/share/mathjax2/LICENSE "$pkgdir"/usr/share/licenses/mathjax2/
}
sha512sums="ac7b2dfc6064148e941e5ee05361467514e5f28449dbb697ff1df556968ccb71f501c4021ade285cbbb995983513669c14d9c06886a7b83a5c75fa30504fa8ab mathjax2-2.7.9.tar.gz"

View file

@ -0,0 +1,45 @@
# Maintainer: Antoine Martin <antoine@ayakael.net>
pkgname=mattermost
pkgver=5.31.0
pkgrel=0
pkgdesc="Open source Slack-alternative in Golang and React"
arch='x86_64'
url="https://mattermost.com"
license='AGPL'
source="https://releases.mattermost.com/${pkgver}/mattermost-${pkgver}-linux-amd64.tar.gz"
builddir="${srcdir}"
subpackages="$pkgname-doc"
build() {
return 0
}
package() {
cd ${builddir}
install -dm755 \
"$pkgdir"/usr/bin \
"$pkgdir"/usr/share/webapps/${pkgname} \
"$pkgdir"/etc/${pkgname} \
"$pkgdir"/usr/share/doc/"$pkgname"
cp -a mattermost "$pkgdir"/usr/share/webapps/.
install -dm755 $pkgdir/usr/share/webapps/$pkgname/client/plugins
mv "$pkgdir"/usr/share/webapps/$pkgname/config/* "$pkgdir"/etc/$pkgname/.
rmdir "$pkgdir"/usr/share/webapps/$pkgname/config
ln -s /etc/$pkgname/config "$pkgdir"/usr/share/webapps/$pkgname/config
sed -e 's@"Directory": ".*"@"Directory": "/var/lib/mattermost/"@g' \
-e 's@tcp(dockerhost:3306)@unix(/run/mysqld/mysqld.sock)@g' \
-i "$pkgdir"/etc/"$pkgname"/config.json
mv mattermost/NOTICE.txt mattermost/README.md "$pkgdir"/usr/share/doc/"$pkgname"
ln -s "/usr/share/webapps/$pkgname/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
}
sha512sums="a321fb5f51c96f80b2e7d176c5157f3e152c6dddf41b0561a2b07e731b0640b1bc63cc0f673d92cf79d5fd4e925e3dfafafa838433a5dfb3a03057dadba3f77b mattermost-5.31.0-linux-amd64.tar.gz"

View file

@ -0,0 +1,38 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=mcpp
pkgver=2.7.2
pkgrel=0
pkgdesc="Matsui's CPP implementation precisely conformed to standards"
arch='x86_64'
license='custom'
url="http://mcpp.sourceforge.net"
depends='musl'
source="https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
namlen.patch
fs28284.patch"
builddir="$srcdir"/$pkgname-$pkgver
subpackages="$pkgname-doc"
prepare() {
cd $builddir
patch -Np1 -i ../namlen.patch
patch -Np1 -i ../fs28284.patch
}
build() {
cd $builddir
./configure --prefix=/usr --enable-mcpplib --disable-static
make
}
package() {
cd $builddir
make DESTDIR="${pkgdir}" install
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
ln -sf ../../doc/${pkgname}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
}
sha512sums="1ca885cb13fdb684de9d0595a9215b52f48a93a69077d82cdcacafe40d9a61fb77b00a3ff2b8890e7bc0a0fcc0c8d70d4093c00c280351cd4459aba67c573235 mcpp-2.7.2.tar.gz
b1c643178ef8f492c02ac0f37bc0446e8a296cd7aca590f46a09002d1a187e9949a96ee542bf878b3dcc3ce8cc108caca186d7996e291d3be1e9f00237718e7a namlen.patch
e8bc225a37ba8b7f72909357fb8a1c32f472fa178e2515a74fda1ff82cabe009ee1254f15059b498b23769430bac026bc7bd08865a4e847c54b72abe61528881 fs28284.patch"

View file

@ -0,0 +1,100 @@
diff -c -r -N ../mcpp-2.7.2/src/internal.H ./src/internal.H
*** ../mcpp-2.7.2/src/internal.H 2008-08-27 10:31:16.000000000 -0230
--- ./src/internal.H 2009-12-17 21:01:35.000000000 -0330
***************
*** 390,395 ****
--- 390,397 ----
extern char identifier[]; /* Lastly scanned name */
extern IFINFO ifstack[]; /* Information of #if nesting */
extern char work_buf[];
+ extern FILEINFO * sh_file;
+ extern int sh_line;
/* Temporary buffer for directive line and macro expansion */
/* main.c */
***************
*** 557,562 ****
#endif
#endif
! #if HOST_HAVE_STPCPY
extern char * stpcpy( char * dest, const char * src);
#endif
--- 559,564 ----
#endif
#endif
! #if HOST_HAVE_STPCPY && !defined(stpcpy)
extern char * stpcpy( char * dest, const char * src);
#endif
diff -c -r -N ../mcpp-2.7.2/src/main.c ./src/main.c
*** ../mcpp-2.7.2/src/main.c 2008-11-05 05:04:46.000000000 -0330
--- ./src/main.c 2009-12-17 20:42:42.000000000 -0330
***************
*** 326,331 ****
--- 326,333 ----
= FALSE;
option_flags.trig = TRIGRAPHS_INIT;
option_flags.dig = DIGRAPHS_INIT;
+ sh_file = NULL;
+ sh_line = 0;
}
int mcpp_lib_main
diff -c -r -N ../mcpp-2.7.2/src/support.c ./src/support.c
*** ../mcpp-2.7.2/src/support.c 2008-06-10 06:02:33.000000000 -0230
--- ./src/support.c 2009-12-17 20:42:39.000000000 -0330
***************
*** 188,194 ****
size_t length
)
{
! if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */
size_t size = MAX( BUF_INCR_SIZE, length);
if (mem_buf_p->buffer == NULL) { /* 1st append */
--- 188,194 ----
size_t length
)
{
! if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */
size_t size = MAX( BUF_INCR_SIZE, length);
if (mem_buf_p->buffer == NULL) { /* 1st append */
***************
*** 1722,1727 ****
--- 1722,1729 ----
sp -= 2;
while (*sp != '\n') /* Until end of line */
mcpp_fputc( *sp++, OUT);
+ mcpp_fputc( '\n', OUT);
+ wrong_line = TRUE;
}
goto end_line;
default: /* Not a comment */
diff -c -r -N ../mcpp-2.7.2/src/system.c ./src/system.c
*** ../mcpp-2.7.2/src/system.c 2008-11-26 06:23:51.000000000 -0330
--- ./src/system.c 2009-12-17 20:42:42.000000000 -0330
***************
*** 3858,3863 ****
--- 3858,3866 ----
}
#endif
+ FILEINFO* sh_file;
+ int sh_line;
+
void sharp(
FILEINFO * sharp_file,
int flag /* Flag to append to the line for GCC */
***************
*** 3868,3875 ****
* else (i.e. 'sharp_file' is NULL) 'infile'.
*/
{
- static FILEINFO * sh_file;
- static int sh_line;
FILEINFO * file;
int line;
--- 3871,3876 ----

View file

@ -0,0 +1,10 @@
--- mcpp-2.7.2/src/mbchar.c 2008-03-08 13:06:13.000000000 +0000
+++ mcpp-2.7.2/src/mbchar.c 2009-03-08 13:14:17.000000000 +0000
@@ -345,7 +345,7 @@
static size_t mb_read_utf8( int c1, char ** in_pp, char ** out_pp);
/* For UTF8 mbchar encoding */
-#define NAMLEN 20
+#define NAMLEN 40
#define UPPER 1 /* To upper */
#define LOWER 0 /* To lower */

View file

@ -0,0 +1,45 @@
# Maintainer: afontenot <adam.m.fontenot@gmail.com>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>
# Contributor: N30N <archlinux@alunamation.com>
pkgname="mozjpeg"
pkgver=4.0.0
pkgrel=0
pkgdesc="JPEG image codec with accelerated baseline decoding and superior encoding"
url="https://github.com/mozilla/mozjpeg"
license="BSD"
arch="i686 x86_64 armv7h"
depends="musl"
makedepends="nasm autoconf automake libtool cmake libpng-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::$url/archive/v${pkgver}.tar.gz"
provides="libjpeg libjpeg.so turbojpeg libjpeg-turbo"
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib -DENABLE_STATIC=FALSE -DPNG_SUPPORTED=TRUE -DWITH_JPEG8=TRUE .
make
}
# much too slow for default, can be enabled if desired
#check() {
# cd "${srcdir}/${pkgname}-${pkgver}"
# make test
#}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make \
DESTDIR="${pkgdir}" \
docdir="/usr/share/doc/${pkgname}" \
exampledir="/usr/share/doc/${pkgname}" \
install
install -D LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -m644 jpegint.h "${pkgdir}/usr/include"
}
sha512sums="1545c10e9e0f960e73db1a940ee7dc25c5ade3b848b3be74baf28aa11a3d9255f7f4442e769e31c7d71db087c2c187a469a9a59545a28e6b1ba3489a54b3716f mozjpeg-4.0.0.tar.gz"

View file

@ -0,0 +1,51 @@
# Maintainer: Edouard Lafon <dev+arch@elafon.98.wf>
pkgname=mumble-web-proxy
pkgver=0.1.1
pkgrel=1
pkgdesc="mumble-web-proxy is a Mumble to WebSocket+WebRTC proxy"
arch='x86_64'
url="https://github.com/johni0702/mumble-web-proxy"
license='AGLP-3.0'
makedepends='rustup libnice-dev openssl-dev clang cargo'
source="$pkgname-$pkgver.tar.gz mumble-web-proxy.initd mumble-web-proxy.conf"
_giturl="https://github.com/johni0702/mumble-web-proxy"
_gittag="cfae6178c70c1436186f16723b18a2cbb0f06138"
builddir="$srcdir/$pkgname"
options="!check"
subpackages="${pkgname}-openrc"
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o $pkgname.tar --format "tar" $_gittag
gzip $pkgname.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
build() {
cd $builddir
export CARGO_HOME="$builddir"/cargo
cargo build --release
}
package() {
install -Dm755 "${builddir}"/target/release/mumble-web-proxy "${pkgdir}"/usr/bin/mumble-web-proxy
install -Dm755 "${srcdir}"/mumble-web-proxy.initd "${pkgdir}"/etc/init.d/mumble-web-proxy
install -Dm644 "${srcdir}"/mumble-web-proxy.conf "${pkgdir}"/etc/mumble-web-proxy.conf
}
sha512sums="08d522fdc625c231b7f931bdb3c788f4c5dabf0ed14a3d76b9bd0e0cb56f8fce0fb72f531670b3004f9105650c36ed15386c2677753c355bbe76e7a56a3ce8b5 mumble-web-proxy-0.1.1.tar.gz
ab470bd12df5a3c9b5d2526c27f8a7e2dc437fc2bfb943b9e98c975d87b2bfa5e7e906001cb66c6c26e505df17a5d335a556b52f534e973ef6b49b14b26468a5 mumble-web-proxy.initd
bbb197930295448c4cbb59b0ba9fbae75d5d2bd0868c96327840b00a69c7755831080a771d487348fe204d09636a95947aaea5d83714126032a38f8a5fce8bd3 mumble-web-proxy.conf"

View file

@ -0,0 +1,2 @@
listen-ws=64737
server='localhost:64738'

View file

@ -0,0 +1,26 @@
#!/sbin/openrc-run
name="Mumble web proxy"
logfile="/var/log/mumble-web-proxy/mumble-web-proxy.log"
pidfile="/run/mumble-web-proxy.pid"
depend() {
use net
}
start() {
ebegin "Starting Mumble web proxy"
start-stop-daemon --start --background \
--user="mumble" \
--make-pidfile --pidfile="${pidfile}" \
--stdout "${logfile}" --stderr "${logfile}" \
--exec /usr/bin/env -- /usr/bin/mumble-web-proxy --config /etc/mumble-web-proxy.conf
eend $?
}
stop() {
ebegin "Stopping Mumble web proxy"
start-stop-daemon --stop \
--pidfile=${pidfile} \
eend $?
}

View file

@ -0,0 +1,42 @@
# Maintainer: Edouard Lafon <dev+arch@elafon.98.wf>
pkgname=mumble-web
pkgver=0.5.1
pkgrel=0
pkgdesc="An HTML5 Mumble client - stable"
arch='noarch'
url="https://github.com/johni0702/mumble-web"
license='custom:ISC'
makedepends='npm jq'
source="https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz LICENSE"
noextract="$pkgname-$pkgver.tgz"
subpackages="$pkgname-doc"
options="!check"
package() {
npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz"
find "$pkgdir/usr" -type d -exec chmod 755 {} +
# Remove references to $pkgdir
find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d"
# Remove references to $srcdir
local tmppackage="$(mktemp)"
local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json"
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
mv "$tmppackage" "$pkgjson"
chmod 644 "$pkgjson"
# Install license since the package doesn't include it
install -Dm 644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Move README to doc
install -dm 755 $pkgdir/usr/share/doc/$pkgname/
mv "$pkgdir/usr/lib/node_modules/$pkgname/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
# npm gives ownership of ALL FILES to build user
# https://bugs.archlinux.org/task/63396
chown -R root:root "${pkgdir}"
}
sha512sums="87de66921c5ac00cfd91c6dde064d3427dbbc979c6e94f18cc3e84e77799e9f2bba361818f08ceedc08ded91865decde24da306e6e3d74f3a42ec5d231105bf6 mumble-web-0.5.1.tgz
a9e2bbe2ae661a0a39852414100ae3b25f5e5915c0d3f6eda4bd17ce3fbc8fc48418315a936d5305212ca4a550ddb1054206a450d1ffbcdb6281d59402afa8ef LICENSE"

View file

@ -0,0 +1,7 @@
Copyright 2016-2018 Jonas Herzig <me@johni0702.de>
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Copyright © 2004-2020 aurweb Development Team AUR packages are user produced content. Any use of the provided files is at your own risk.

View file

@ -0,0 +1,61 @@
# Maintainer: Edouard Lafon <dev+arch@elafon.98.wf>
pkgname=mumpi
pkgver=2.27
pkgrel=0
pkgdesc="MumPI is your Webinterface written in PHP for your Mumble Server ("Murmur") using the Ice-Middleware."
arch='noarch'
url="https://github.com/Kissaki/MumPI"
license='LGPL3'
depends='php7-zeroc-ice35'
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/Kissaki/MumPI"
_gittag="0b489576cba1dd5656344488f4be5de3dba6e77f"
builddir="$srcdir/$pkgname"
options="!check"
subpackages="${pkgname}-openrc"
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o $pkgname.tar --format "tar" $_gittag
gzip $pkgname.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
package() {
cd ${builddir}
install -d "${pkgdir}/usr/share/webapps/${pkgname}"
cp -r . "${pkgdir}/usr/share/webapps/${pkgname}/"
# Config
indall -d "${pkgdir}"/etc/${pkgname}
nstall -Dm644 settings.inc.php "${pkgdir}"/etc/${pkgname}/settings.inc.php
rm "${pkgdir}"/usr/share/webapps/${pkgname}/settings.inc.php
ln -s /etc/${pkgname}/settings.inc.php "${pkgdir}"/usr/share/webapps/${pkgname}/settings.inc.php
# Data
install -d "${pkgdir}/var/lib/${pkgname}"
cp -r ./data/. "${pkgdir}/var/lib/${pkgname}/"
rm -R "${pkgdir}"/usr/share/webapps/${pkgname}/data
ln -s /var/lib/${pkgname} "${pkgdir}"/usr/share/webapps/${pkgname}/data
# Tmp
install -d "${pkgdir}"/var/cache/${pkgname}
ln -s /var/cache/$pkgname "${pkgdir}"/usr/share/webapps/${pkgname}/tmp
}
sha512sums="bf16e399d1631626a51f12bbd07e5606994f086c44cd609d96c5761a8c023b99682c96cadcedbf250ebc01d71764d99f8fbce973a5db49b16adb0a5ac17989a0 mumpi-2.27.tar.gz"

View file

@ -0,0 +1,32 @@
# Maintainer:
# Contributor: Tom Gundersen <teg@jklm.no>
# Contributor: Travis Willard <travis@archlinux.org>
pkgname=nss-mdns
pkgver=0.14.1
pkgrel=0
pkgdesc="glibc plugin providing host name resolution via mDNS"
arch='x86_64'
url="http://0pointer.de/lennart/projects/nss-mdns/"
license='LGPL'
depends='musl'
makedepends='nss-dev nspr-dev'
source="https://github.com/lathiat/nss-mdns/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"
builddir="${srcdir}/nss-mdns-${pkgver}"
build() {
cd ${builddir}
CFLAGS='-I/usr/include/nss -I/usr/include/nspr'
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
make
}
package() {
cd ${builddir}
make DESTDIR="${pkgdir}" install
}
sha512sums="7c06b984443881a6c0a1f850ee33f14780562cc6168fe1cda176303eb799ece510d51d3830928616723bb95250ad6462978cd8b857f2b79d87116da2c1aeaa5e nss-mdns-0.14.1.tar.gz"

View file

@ -0,0 +1,34 @@
From c276ddc394dd402327603959271eac63a2e1ec1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 5 Feb 2015 08:40:00 +0200
Subject: [PATCH] busybox basename
---
Makefile.org | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.org b/Makefile.org
index b7a3f96..035fa83 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -649,7 +649,7 @@ install_docs:
filecase=-i; \
esac; \
set -e; for i in doc/apps/*.pod; do \
- fn=`basename $$i .pod`; \
+ fn=`basename $$i .pod || true`; \
sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
(cd `$(PERL) util/dirname.pl $$i`; \
@@ -666,7 +666,7 @@ install_docs:
done); \
done; \
set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
- fn=`basename $$i .pod`; \
+ fn=`basename $$i .pod || true`; \
sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
(cd `$(PERL) util/dirname.pl $$i`; \
--
2.2.2

View file

@ -0,0 +1,26 @@
From 5caf1bdcdb56358c0ce38ef404fedbe323e66cb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 5 Feb 2015 08:40:32 +0200
Subject: [PATCH] use termios
---
crypto/ui/ui_openssl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c
index 8bda83c..a89b5f2 100644
--- a/crypto/ui/ui_openssl.c
+++ b/crypto/ui/ui_openssl.c
@@ -224,6 +224,9 @@
# undef SGTTY
#endif
+#define TERMIOS
+#undef TERMIO
+
#ifdef TERMIOS
# include <termios.h>
# define TTY_STRUCT struct termios
--
2.2.2

View file

@ -0,0 +1,79 @@
From 09e6425ad6927a825b077af85c50b2fb04773757 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 5 Feb 2015 08:52:05 +0200
Subject: [PATCH] fix default ca path for apps
---
apps/s_server.c | 22 ++++++++++++++--------
apps/s_time.c | 13 ++++++-------
3 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/apps/s_server.c b/apps/s_server.c
index baa2455..2d5dc97 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1770,12 +1770,14 @@ int MAIN(int argc, char *argv[])
}
#endif
- if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) ||
- (!SSL_CTX_set_default_verify_paths(ctx))) {
- /* BIO_printf(bio_err,"X509_load_verify_locations\n"); */
- ERR_print_errors(bio_err);
- /* goto end; */
+ if (CAfile == NULL && CApath == NULL) {
+ if (!SSL_CTX_set_default_verify_paths(ctx))
+ ERR_print_errors(bio_err);
+ } else {
+ if (!SSL_CTX_load_verify_locations(ctx, CAfile, CApath))
+ ERR_print_errors(bio_err);
}
+
if (vpm)
SSL_CTX_set1_param(ctx, vpm);
@@ -1838,10 +1840,14 @@ int MAIN(int argc, char *argv[])
else
SSL_CTX_sess_set_cache_size(ctx2, 128);
- if ((!SSL_CTX_load_verify_locations(ctx2, CAfile, CApath)) ||
- (!SSL_CTX_set_default_verify_paths(ctx2))) {
- ERR_print_errors(bio_err);
+ if (CAfile == NULL && CApath == NULL) {
+ if (!SSL_CTX_set_default_verify_paths(ctx2))
+ ERR_print_errors(bio_err);
+ } else {
+ if (!SSL_CTX_load_verify_locations(ctx2, CAfile, CApath))
+ ERR_print_errors(bio_err);
}
+
if (vpm)
SSL_CTX_set1_param(ctx2, vpm);
diff --git a/apps/s_time.c b/apps/s_time.c
index 5846f3a..c8f371a 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -377,13 +377,12 @@ int MAIN(int argc, char **argv)
SSL_load_error_strings();
- if ((!SSL_CTX_load_verify_locations(tm_ctx, CAfile, CApath)) ||
- (!SSL_CTX_set_default_verify_paths(tm_ctx))) {
- /*
- * BIO_printf(bio_err,"error setting default verify locations\n");
- */
- ERR_print_errors(bio_err);
- /* goto end; */
+ if (CAfile == NULL && CApath == NULL) {
+ if (!SSL_CTX_set_default_verify_paths(tm_ctx))
+ ERR_print_errors(bio_err);
+ } else {
+ if (!SSL_CTX_load_verify_locations(tm_ctx, CAfile, CApath))
+ ERR_print_errors(bio_err);
}
if (tm_cipher == NULL)
--
2.2.2

View file

@ -0,0 +1,349 @@
diff -ru openssl-1.0.2a.orig/Makefile.org openssl-1.0.2a/Makefile.org
--- openssl-1.0.2d.orig/Makefile.org 2015-07-09 16:30:50.201986573 -0300
+++ openssl-1.0.2d/Makefile.org 2015-07-09 16:30:50.201986573 -0300
@@ -278,17 +278,17 @@
build_libssl: build_ssl libssl.pc
build_crypto:
- @dir=crypto; target=all; $(BUILD_ONE_CMD)
+ +@dir=crypto; target=all; $(BUILD_ONE_CMD)
build_ssl: build_crypto
- @dir=ssl; target=all; $(BUILD_ONE_CMD)
+ +@dir=ssl; target=all; $(BUILD_ONE_CMD)
build_engines: build_crypto
- @dir=engines; target=all; $(BUILD_ONE_CMD)
+ +@dir=engines; target=all; $(BUILD_ONE_CMD)
build_apps: build_libs
- @dir=apps; target=all; $(BUILD_ONE_CMD)
+ +@dir=apps; target=all; $(BUILD_ONE_CMD)
build_tests: build_libs
- @dir=test; target=all; $(BUILD_ONE_CMD)
+ +@dir=test; target=all; $(BUILD_ONE_CMD)
build_tools: build_libs
- @dir=tools; target=all; $(BUILD_ONE_CMD)
+ +@dir=tools; target=all; $(BUILD_ONE_CMD)
all_testapps: build_libs build_testapps
build_testapps:
@@ -536,9 +536,9 @@
dist_pem_h:
(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
-install: all install_docs install_sw
+install: install_docs install_sw
-install_sw:
+install_dirs:
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
@@ -547,12 +547,19 @@
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
+ @$(PERL) $(TOP)/util/mkdir-p.pl \
+ $(INSTALL_PREFIX)$(MANDIR)/man1 \
+ $(INSTALL_PREFIX)$(MANDIR)/man3 \
+ $(INSTALL_PREFIX)$(MANDIR)/man5 \
+ $(INSTALL_PREFIX)$(MANDIR)/man7
+
+install_sw: install_dirs
@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
do \
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
- @set -e; target=install; $(RECURSIVE_BUILD_CMD)
+ +@set -e; target=install; $(RECURSIVE_BUILD_CMD)
@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
do \
if [ -f "$$i" ]; then \
@@ -636,12 +643,7 @@
done; \
done
-install_docs:
- @$(PERL) $(TOP)/util/mkdir-p.pl \
- $(INSTALL_PREFIX)$(MANDIR)/man1 \
- $(INSTALL_PREFIX)$(MANDIR)/man3 \
- $(INSTALL_PREFIX)$(MANDIR)/man5 \
- $(INSTALL_PREFIX)$(MANDIR)/man7
+install_docs: install_dirs
@pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
here="`pwd`"; \
filecase=; \
diff -ru openssl-1.0.2a.orig/Makefile.shared openssl-1.0.2a/Makefile.shared
--- openssl-1.0.2a.orig/Makefile.shared 2015-01-20 12:33:36.000000000 +0000
+++ openssl-1.0.2a/Makefile.shared 2015-03-19 14:53:31.246908039 +0000
@@ -105,6 +105,7 @@
SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
+ [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
$${SHAREDCMD} $${SHAREDFLAGS} \
-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
@@ -122,6 +123,7 @@
done; \
fi; \
if [ -n "$$SHLIB_SOVER" ]; then \
+ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
fi; \
diff -ru openssl-1.0.2a.orig/crypto/Makefile openssl-1.0.2a/crypto/Makefile
--- openssl-1.0.2a.orig/crypto/Makefile 2015-03-19 13:31:02.000000000 +0000
+++ openssl-1.0.2a/crypto/Makefile 2015-03-19 14:53:31.246908039 +0000
@@ -85,11 +85,11 @@
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
subdirs:
- @target=all; $(RECURSIVE_MAKE)
+ +@target=all; $(RECURSIVE_MAKE)
files:
$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
- @target=files; $(RECURSIVE_MAKE)
+ +@target=files; $(RECURSIVE_MAKE)
links:
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
@@ -100,7 +100,7 @@
# lib: $(LIB): are splitted to avoid end-less loop
lib: $(LIB)
@touch lib
-$(LIB): $(LIBOBJ)
+$(LIB): $(LIBOBJ) | subdirs
$(AR) $(LIB) $(LIBOBJ)
test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
$(RANLIB) $(LIB) || echo Never mind.
@@ -111,7 +111,7 @@
fi
libs:
- @target=lib; $(RECURSIVE_MAKE)
+ +@target=lib; $(RECURSIVE_MAKE)
install:
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@@ -120,7 +120,7 @@
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
- @target=install; $(RECURSIVE_MAKE)
+ +@target=install; $(RECURSIVE_MAKE)
lint:
@target=lint; $(RECURSIVE_MAKE)
diff -ru openssl-1.0.2a.orig/engines/Makefile openssl-1.0.2a/engines/Makefile
--- openssl-1.0.2a.orig/engines/Makefile 2015-03-19 13:31:14.000000000 +0000
+++ openssl-1.0.2a/engines/Makefile 2015-03-19 14:53:31.246908039 +0000
@@ -72,7 +72,7 @@
all: lib subdirs
-lib: $(LIBOBJ)
+lib: $(LIBOBJ) | subdirs
@if [ -n "$(SHARED_LIBS)" ]; then \
set -e; \
for l in $(LIBNAMES); do \
@@ -89,7 +89,7 @@
subdirs:
echo $(EDIRS)
- @target=all; $(RECURSIVE_MAKE)
+ +@target=all; $(RECURSIVE_MAKE)
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -128,7 +128,7 @@
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
done; \
fi
- @target=install; $(RECURSIVE_MAKE)
+ +@target=install; $(RECURSIVE_MAKE)
tags:
ctags $(SRC)
diff -ru openssl-1.0.2a.orig/test/Makefile openssl-1.0.2a/test/Makefile
--- openssl-1.0.2a.orig/test/Makefile 2015-03-19 13:31:16.000000000 +0000
+++ openssl-1.0.2a/test/Makefile 2015-03-19 14:55:44.146017128 +0000
@@ -133,7 +133,7 @@
tags:
ctags $(SRC)
-tests: exe apps $(TESTS)
+tests: exe $(TESTS)
apps:
@(cd ..; $(MAKE) DIRS=apps all)
@@ -402,121 +402,121 @@
link_app.$${shlib_target}
$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
- @target=$(RSATEST); $(BUILD_CMD)
+ +@target=$(RSATEST); $(BUILD_CMD)
$(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO)
- @target=$(BNTEST); $(BUILD_CMD)
+ +@target=$(BNTEST); $(BUILD_CMD)
$(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO)
- @target=$(ECTEST); $(BUILD_CMD)
+ +@target=$(ECTEST); $(BUILD_CMD)
$(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO)
- @target=$(EXPTEST); $(BUILD_CMD)
+ +@target=$(EXPTEST); $(BUILD_CMD)
$(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO)
- @target=$(IDEATEST); $(BUILD_CMD)
+ +@target=$(IDEATEST); $(BUILD_CMD)
$(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO)
- @target=$(MD2TEST); $(BUILD_CMD)
+ +@target=$(MD2TEST); $(BUILD_CMD)
$(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO)
- @target=$(SHATEST); $(BUILD_CMD)
+ +@target=$(SHATEST); $(BUILD_CMD)
$(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO)
- @target=$(SHA1TEST); $(BUILD_CMD)
+ +@target=$(SHA1TEST); $(BUILD_CMD)
$(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
- @target=$(SHA256TEST); $(BUILD_CMD)
+ +@target=$(SHA256TEST); $(BUILD_CMD)
$(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
- @target=$(SHA512TEST); $(BUILD_CMD)
+ +@target=$(SHA512TEST); $(BUILD_CMD)
$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
- @target=$(RMDTEST); $(BUILD_CMD)
+ +@target=$(RMDTEST); $(BUILD_CMD)
$(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO)
- @target=$(MDC2TEST); $(BUILD_CMD)
+ +@target=$(MDC2TEST); $(BUILD_CMD)
$(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO)
- @target=$(MD4TEST); $(BUILD_CMD)
+ +@target=$(MD4TEST); $(BUILD_CMD)
$(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO)
- @target=$(MD5TEST); $(BUILD_CMD)
+ +@target=$(MD5TEST); $(BUILD_CMD)
$(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO)
- @target=$(HMACTEST); $(BUILD_CMD)
+ +@target=$(HMACTEST); $(BUILD_CMD)
$(WPTEST)$(EXE_EXT): $(WPTEST).o $(DLIBCRYPTO)
- @target=$(WPTEST); $(BUILD_CMD)
+ +@target=$(WPTEST); $(BUILD_CMD)
$(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO)
- @target=$(RC2TEST); $(BUILD_CMD)
+ +@target=$(RC2TEST); $(BUILD_CMD)
$(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO)
- @target=$(BFTEST); $(BUILD_CMD)
+ +@target=$(BFTEST); $(BUILD_CMD)
$(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO)
- @target=$(CASTTEST); $(BUILD_CMD)
+ +@target=$(CASTTEST); $(BUILD_CMD)
$(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO)
- @target=$(RC4TEST); $(BUILD_CMD)
+ +@target=$(RC4TEST); $(BUILD_CMD)
$(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO)
- @target=$(RC5TEST); $(BUILD_CMD)
+ +@target=$(RC5TEST); $(BUILD_CMD)
$(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO)
- @target=$(DESTEST); $(BUILD_CMD)
+ +@target=$(DESTEST); $(BUILD_CMD)
$(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO)
- @target=$(RANDTEST); $(BUILD_CMD)
+ +@target=$(RANDTEST); $(BUILD_CMD)
$(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO)
- @target=$(DHTEST); $(BUILD_CMD)
+ +@target=$(DHTEST); $(BUILD_CMD)
$(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO)
- @target=$(DSATEST); $(BUILD_CMD)
+ +@target=$(DSATEST); $(BUILD_CMD)
$(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
- @target=$(METHTEST); $(BUILD_CMD)
+ +@target=$(METHTEST); $(BUILD_CMD)
$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
- @target=$(SSLTEST); $(FIPS_BUILD_CMD)
+ +@target=$(SSLTEST); $(FIPS_BUILD_CMD)
$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
- @target=$(ENGINETEST); $(BUILD_CMD)
+ +@target=$(ENGINETEST); $(BUILD_CMD)
$(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO)
- @target=$(EVPTEST); $(BUILD_CMD)
+ +@target=$(EVPTEST); $(BUILD_CMD)
$(EVPEXTRATEST)$(EXE_EXT): $(EVPEXTRATEST).o $(DLIBCRYPTO)
- @target=$(EVPEXTRATEST); $(BUILD_CMD)
+ +@target=$(EVPEXTRATEST); $(BUILD_CMD)
$(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO)
- @target=$(ECDSATEST); $(BUILD_CMD)
+ +@target=$(ECDSATEST); $(BUILD_CMD)
$(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
- @target=$(ECDHTEST); $(BUILD_CMD)
+ +@target=$(ECDHTEST); $(BUILD_CMD)
$(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
- @target=$(IGETEST); $(BUILD_CMD)
+ +@target=$(IGETEST); $(BUILD_CMD)
$(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO)
- @target=$(JPAKETEST); $(BUILD_CMD)
+ +@target=$(JPAKETEST); $(BUILD_CMD)
$(ASN1TEST)$(EXE_EXT): $(ASN1TEST).o $(DLIBCRYPTO)
- @target=$(ASN1TEST); $(BUILD_CMD)
+ +@target=$(ASN1TEST); $(BUILD_CMD)
$(SRPTEST)$(EXE_EXT): $(SRPTEST).o $(DLIBCRYPTO)
- @target=$(SRPTEST); $(BUILD_CMD)
+ +@target=$(SRPTEST); $(BUILD_CMD)
$(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO)
- @target=$(V3NAMETEST); $(BUILD_CMD)
+ +@target=$(V3NAMETEST); $(BUILD_CMD)
$(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
- @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
+ +@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
$(CONSTTIMETEST)$(EXE_EXT): $(CONSTTIMETEST).o
- @target=$(CONSTTIMETEST) $(BUILD_CMD)
+ +@target=$(CONSTTIMETEST) $(BUILD_CMD)
#$(AESTEST).o: $(AESTEST).c
# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
@@ -529,7 +529,7 @@
# fi
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
- @target=dummytest; $(BUILD_CMD)
+ +@target=dummytest; $(BUILD_CMD)
# DO NOT DELETE THIS LINE -- make depend depends on it.

View file

@ -0,0 +1,68 @@
From 4785c095dbfb3630ddf6685f23e3a19c7c804cbc Mon Sep 17 00:00:00 2001
From: William Pitcock <nenolod@dereferenced.org>
Date: Thu, 5 Feb 2015 09:02:00 +0200
Subject: [PATCH] add ircv3 tls-3.1 extension support to s_client
---
apps/s_client.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/apps/s_client.c b/apps/s_client.c
index 8aee02a..0a28b89 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -401,7 +401,7 @@ static void sc_usage(void)
BIO_printf(bio_err,
" 'prot' defines which one to assume. Currently,\n");
BIO_printf(bio_err,
- " only \"smtp\", \"pop3\", \"imap\", \"ftp\" and \"xmpp\"\n");
+ " only \"smtp\", \"pop3\", \"imap\", \"ftp\", \"xmpp\" and \"ircv3\"\n");
BIO_printf(bio_err, " are supported.\n");
#ifndef OPENSSL_NO_ENGINE
BIO_printf(bio_err,
@@ -640,7 +640,8 @@ enum {
PROTO_POP3,
PROTO_IMAP,
PROTO_FTP,
- PROTO_XMPP
+ PROTO_XMPP,
+ PROTO_IRCV3,
};
int MAIN(int, char **);
@@ -1062,6 +1063,8 @@ int MAIN(int argc, char **argv)
starttls_proto = PROTO_FTP;
else if (strcmp(*argv, "xmpp") == 0)
starttls_proto = PROTO_XMPP;
+ else if (strcmp(*argv, "ircv3") == 0)
+ starttls_proto = PROTO_IRCV3;
else
goto bad;
}
@@ -1646,6 +1649,23 @@ int MAIN(int argc, char **argv)
goto shut;
mbuf[0] = 0;
}
+ if (starttls_proto == PROTO_IRCV3) {
+ int seen = 0;
+ BIO_printf(sbio,"CAP REQ :tls\r\n");
+
+ while (!strstr(mbuf,"CAP")) {
+ seen = BIO_read(sbio,mbuf,BUFSIZZ);
+ mbuf[seen] = 0;
+ }
+ if (!strstr(mbuf,"ACK"))
+ goto shut;
+ BIO_printf(sbio,"CAP END\r\nSTARTTLS\r\n");
+ while (!strstr(sbuf, "670")) {
+ seen = BIO_read(sbio,sbuf,BUFSIZZ);
+ sbuf[seen] = 0;
+ }
+ mbuf[0] = 0;
+ }
for (;;) {
FD_ZERO(&readfds);
--
2.2.2

View file

@ -0,0 +1,27 @@
From 7457e26d3a78c7cd923242d87d04febadddea086 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 5 Feb 2015 10:06:31 +0200
Subject: [PATCH] maintain abi compat with no-freelist and regular build
---
ssl/ssl.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ssl/ssl.h b/ssl/ssl.h
index 2b0f662..636cb5d 100644
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -1113,6 +1113,10 @@ struct ssl_ctx_st {
unsigned int freelist_max_len;
struct ssl3_buf_freelist_st *wbuf_freelist;
struct ssl3_buf_freelist_st *rbuf_freelist;
+# else
+ unsigned int freelist_dummy0;
+ void *freelist_dummy1;
+ void *freelist_dummy2;
# endif
# ifndef OPENSSL_NO_SRP
SRP_CTX srp_ctx; /* ctx for SRP authentication */
--
2.2.2

View file

@ -0,0 +1,11 @@
--- a/Makefile.shared 2005-06-23 22:47:54.000000000 +0200
+++ b/Makefile.shared 2005-11-16 22:35:37.000000000 +0100
@@ -153,7 +153,7 @@
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
+DO_GNU_APP=LDFLAGS="$(CFLAGS)"
#This is rather special. It's a special target with which one can link
#applications without bothering with any features that have anything to

View file

@ -0,0 +1,38 @@
diff -ru openssl-1.0.2a.orig/doc/ssl/SSL_COMP_add_compression_method.pod openssl-1.0.2a/doc/ssl/SSL_COMP_add_compression_method.pod
--- openssl-1.0.2a.orig/doc/ssl/SSL_COMP_add_compression_method.pod 2015-01-15 16:43:14.000000000 -0200
+++ openssl-1.0.2a/doc/ssl/SSL_COMP_add_compression_method.pod 2015-03-27 15:18:47.280054883 -0200
@@ -47,6 +47,13 @@
been standardized, the compression API will most likely be changed. Using
it in the current state is not recommended.
+It is also not recommended to use compression if data transfered contain
+untrusted parts that can be manipulated by an attacker as he could then
+get information about the encrypted data. See the CRIME attack. For
+that reason the default loading of the zlib compression method is
+disabled and enabled only if the environment variable B<OPENSSL_DEFAULT_ZLIB>
+is present during the library initialization.
+
=head1 RETURN VALUES
SSL_COMP_add_compression_method() may return the following values:
diff -ru openssl-1.0.2a.orig/ssl/ssl_ciph.c openssl-1.0.2a/ssl/ssl_ciph.c
--- openssl-1.0.2a.orig/ssl/ssl_ciph.c 2015-03-19 15:30:36.000000000 -0200
+++ openssl-1.0.2a/ssl/ssl_ciph.c 2015-03-27 15:23:05.960057092 -0200
@@ -141,6 +141,8 @@
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <sys/auxv.h>
#include <openssl/objects.h>
#ifndef OPENSSL_NO_COMP
# include <openssl/comp.h>
@@ -481,7 +483,7 @@
MemCheck_off();
ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
- if (ssl_comp_methods != NULL) {
+ if (ssl_comp_methods != NULL && getauxval(AT_SECURE) == 0 && getenv("OPENSSL_DEFAULT_ZLIB") != NULL) {
comp = (SSL_COMP *)OPENSSL_malloc(sizeof(SSL_COMP));
if (comp != NULL) {
comp->method = COMP_zlib();

View file

@ -0,0 +1,88 @@
From 83c96cbc76604daccbc31cea9411555aea96fd6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 5 Feb 2015 09:16:51 +0200
Subject: [PATCH] crypto/hmac: support EVP_MD_CTX_FLAG_ONESHOT and set it
properly
Some engines (namely VIA C7 Padlock) work only if EVP_MD_CTX_FLAG_ONESHOT
is set before final update. This is because some crypto accelerators cannot
perform non-finalizing transform of the digest.
The usage of EVP_MD_CTX_FLAG_ONESHOT is used semantically slightly
differently here. It is set before the final EVP_DigestUpdate call, not
necessarily before EVP_DigestInit call. This will not cause any problems
though.
---
crypto/hmac/hmac.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 1fc9e2c..6f16578 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -109,7 +109,8 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
j = EVP_MD_block_size(md);
OPENSSL_assert(j <= (int)sizeof(ctx->key));
if (j < len) {
- if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl))
+ EVP_MD_CTX_set_flags(&ctx->md_ctx, EVP_MD_CTX_FLAG_ONESHOT);
+ if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl))
goto err;
if (!EVP_DigestUpdate(&ctx->md_ctx, key, len))
goto err;
@@ -129,6 +130,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
if (reset) {
for (i = 0; i < HMAC_MAX_MD_CBLOCK; i++)
pad[i] = 0x36 ^ ctx->key[i];
+ EVP_MD_CTX_clear_flags(&ctx->i_ctx, EVP_MD_CTX_FLAG_ONESHOT);
if (!EVP_DigestInit_ex(&ctx->i_ctx, md, impl))
goto err;
if (!EVP_DigestUpdate(&ctx->i_ctx, pad, EVP_MD_block_size(md)))
@@ -136,6 +138,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
for (i = 0; i < HMAC_MAX_MD_CBLOCK; i++)
pad[i] = 0x5c ^ ctx->key[i];
+ EVP_MD_CTX_clear_flags(&ctx->o_ctx, EVP_MD_CTX_FLAG_ONESHOT);
if (!EVP_DigestInit_ex(&ctx->o_ctx, md, impl))
goto err;
if (!EVP_DigestUpdate(&ctx->o_ctx, pad, EVP_MD_block_size(md)))
@@ -143,6 +146,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
}
if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->i_ctx))
goto err;
+ EVP_MD_CTX_clear_flags(&ctx->md_ctx, EVP_MD_CTX_FLAG_ONESHOT);
return 1;
err:
return 0;
@@ -177,6 +181,7 @@ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len)
goto err;
if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->o_ctx))
goto err;
+ EVP_MD_CTX_set_flags(&ctx->md_ctx,EVP_MD_CTX_FLAG_ONESHOT);
if (!EVP_DigestUpdate(&ctx->md_ctx, buf, i))
goto err;
if (!EVP_DigestFinal_ex(&ctx->md_ctx, md, len))
@@ -233,8 +238,9 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
if (md == NULL)
md = m;
HMAC_CTX_init(&c);
- if (!HMAC_Init(&c, key, key_len, evp_md))
+ if (!HMAC_Init_ex(&c, key, key_len, evp_md, NULL))
goto err;
+ HMAC_CTX_set_flags(&c,EVP_MD_CTX_FLAG_ONESHOT);
if (!HMAC_Update(&c, d, n))
goto err;
if (!HMAC_Final(&c, md, md_len))
@@ -247,7 +253,7 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags)
{
- EVP_MD_CTX_set_flags(&ctx->i_ctx, flags);
- EVP_MD_CTX_set_flags(&ctx->o_ctx, flags);
+ EVP_MD_CTX_set_flags(&ctx->i_ctx, flags & ~EVP_MD_CTX_FLAG_ONESHOT);
+ EVP_MD_CTX_set_flags(&ctx->o_ctx, flags & ~EVP_MD_CTX_FLAG_ONESHOT);
EVP_MD_CTX_set_flags(&ctx->md_ctx, flags);
}
--
2.2.2

View file

@ -0,0 +1,200 @@
From ba17588a940ee712c3ef6d458adb1087f0c84521 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 5 Feb 2015 09:28:10 +0200
Subject: [PATCH] backport changes from upstream padlock module.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Includes support for VIA Nano 64-bit mode.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
---
engines/e_padlock.c | 142 +++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 125 insertions(+), 17 deletions(-)
diff --git a/engines/e_padlock.c b/engines/e_padlock.c
index 2898e4c..94406cb 100644
--- a/engines/e_padlock.c
+++ b/engines/e_padlock.c
@@ -101,7 +101,10 @@
*/
# undef COMPILE_HW_PADLOCK
# if !defined(I386_ONLY) && !defined(OPENSSL_NO_INLINE_ASM)
-# if (defined(__GNUC__) && (defined(__i386__) || defined(__i386))) || \
+# if (defined(__GNUC__) && __GNUC__>=2 && \
+ (defined(__i386__) || defined(__i386) || \
+ defined(__x86_64__) || defined(__x86_64)) \
+ ) || \
(defined(_MSC_VER) && defined(_M_IX86))
# define COMPILE_HW_PADLOCK
# endif
@@ -303,6 +306,7 @@ static volatile struct padlock_cipher_data *padlock_saved_context;
* =======================================================
*/
# if defined(__GNUC__) && __GNUC__>=2
+# if defined(__i386__) || defined(__i386)
/*
* As for excessive "push %ebx"/"pop %ebx" found all over.
* When generating position-independent code GCC won't let
@@ -379,22 +383,6 @@ static int padlock_available(void)
return padlock_use_ace + padlock_use_rng;
}
-# ifndef OPENSSL_NO_AES
-# ifndef AES_ASM
-/* Our own htonl()/ntohl() */
-static inline void padlock_bswapl(AES_KEY *ks)
-{
- size_t i = sizeof(ks->rd_key) / sizeof(ks->rd_key[0]);
- unsigned int *key = ks->rd_key;
-
- while (i--) {
- asm volatile ("bswapl %0":"+r" (*key));
- key++;
- }
-}
-# endif
-# endif
-
/*
* Force key reload from memory to the CPU microcode. Loading EFLAGS from the
* stack clears EFLAGS[30] which does the trick.
@@ -448,6 +436,110 @@ static inline void *name(size_t cnt, \
: "edx", "cc", "memory"); \
return iv; \
}
+#endif
+
+#elif defined(__x86_64__) || defined(__x86_64)
+
+/* Load supported features of the CPU to see if
+ the PadLock is available. */
+static int
+padlock_available(void)
+{
+ char vendor_string[16];
+ unsigned int eax, edx;
+
+ /* Are we running on the Centaur (VIA) CPU? */
+ eax = 0x00000000;
+ vendor_string[12] = 0;
+ asm volatile (
+ "cpuid\n"
+ "movl %%ebx,(%1)\n"
+ "movl %%edx,4(%1)\n"
+ "movl %%ecx,8(%1)\n"
+ : "+a"(eax) : "r"(vendor_string) : "rbx", "rcx", "rdx");
+ if (strcmp(vendor_string, "CentaurHauls") != 0)
+ return 0;
+
+ /* Check for Centaur Extended Feature Flags presence */
+ eax = 0xC0000000;
+ asm volatile ("cpuid"
+ : "+a"(eax) : : "rbx", "rcx", "rdx");
+ if (eax < 0xC0000001)
+ return 0;
+
+ /* Read the Centaur Extended Feature Flags */
+ eax = 0xC0000001;
+ asm volatile ("cpuid"
+ : "+a"(eax), "=d"(edx) : : "rbx", "rcx");
+
+ /* Fill up some flags */
+ padlock_use_ace = ((edx & (0x3<<6)) == (0x3<<6));
+ padlock_use_rng = ((edx & (0x3<<2)) == (0x3<<2));
+
+ return padlock_use_ace + padlock_use_rng;
+}
+
+/* Force key reload from memory to the CPU microcode.
+ Loading EFLAGS from the stack clears EFLAGS[30]
+ which does the trick. */
+static inline void
+padlock_reload_key(void)
+{
+ asm volatile ("pushfq; popfq");
+}
+
+#ifndef OPENSSL_NO_AES
+/*
+ * This is heuristic key context tracing. At first one
+ * believes that one should use atomic swap instructions,
+ * but it's not actually necessary. Point is that if
+ * padlock_saved_context was changed by another thread
+ * after we've read it and before we compare it with cdata,
+ * our key *shall* be reloaded upon thread context switch
+ * and we are therefore set in either case...
+ */
+static inline void
+padlock_verify_context(struct padlock_cipher_data *cdata)
+{
+ asm volatile (
+ "pushfq\n"
+" btl $30,(%%rsp)\n"
+" jnc 1f\n"
+" cmpq %2,%1\n"
+" je 1f\n"
+" popfq\n"
+" subq $8,%%rsp\n"
+"1: addq $8,%%rsp\n"
+" movq %2,%0"
+ :"+m"(padlock_saved_context)
+ : "r"(padlock_saved_context), "r"(cdata) : "cc");
+}
+
+/* Template for padlock_xcrypt_* modes */
+/* BIG FAT WARNING:
+ * The offsets used with 'leal' instructions
+ * describe items of the 'padlock_cipher_data'
+ * structure.
+ */
+#define PADLOCK_XCRYPT_ASM(name,rep_xcrypt) \
+static inline void *name(size_t cnt, \
+ struct padlock_cipher_data *cdata, \
+ void *out, const void *inp) \
+{ void *iv; \
+ asm volatile ( "leaq 16(%0),%%rdx\n" \
+ " leaq 32(%0),%%rbx\n" \
+ rep_xcrypt "\n" \
+ : "=a"(iv), "=c"(cnt), "=D"(out), "=S"(inp) \
+ : "0"(cdata), "1"(cnt), "2"(out), "3"(inp) \
+ : "rbx", "rdx", "cc", "memory"); \
+ return iv; \
+}
+#endif
+
+#endif /* cpu */
+
+
+# ifndef OPENSSL_NO_AES
/* Generate all functions with appropriate opcodes */
/* rep xcryptecb */
@@ -458,7 +550,23 @@ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8")
PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0")
/* rep xcryptofb */
PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8")
+
+# ifndef AES_ASM
+/* Our own htonl()/ntohl() */
+static inline void padlock_bswapl(AES_KEY *ks)
+{
+ size_t i = sizeof(ks->rd_key) / sizeof(ks->rd_key[0]);
+ unsigned int *key = ks->rd_key;
+
+ while (i--) {
+ asm volatile ("bswapl %0":"+r" (*key));
+ key++;
+ }
+}
+# endif
+
# endif
+
/* The RNG call itself */
static inline unsigned int padlock_xstore(void *addr, unsigned int edx_in)
{
--
2.2.2

View file

@ -0,0 +1,782 @@
From 728af0306505f1ff91364ac2175fb6bf5da90ec3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 5 Feb 2015 09:41:12 +0200
Subject: [PATCH] engines/e_padlock: implement sha1/sha224/sha256 acceleration
Limited support for VIA C7 that works only when EVP_MD_CTX_FLAG_ONESHOT
is used appropriately (as done by EVP_Digest, and my previous HMAC patch).
Full support for VIA Nano including partial transformation and 64-bit mode.
Benchmarks from VIA Nano 1.6GHz, done with including the previous HMAC and
apps/speed patches done. From single run, error margin of about 100-200k.
No padlock
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
sha1 20057.60k 51514.05k 99721.39k 130167.81k 142811.14k
sha256 7757.72k 16907.18k 28937.05k 35181.23k 37568.51k
hmac(sha1) 8582.53k 27644.69k 70402.30k 114602.67k 140167.85k
With the patch
sha1 37713.77k 114562.71k 259637.33k 379907.41k 438818.13k
sha256 34262.86k 103233.75k 232476.07k 338386.60k 389860.01k
hmac(sha1) 8424.70k 31475.11k 104036.10k 245559.30k 406667.26k
---
engines/e_padlock.c | 663 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 614 insertions(+), 49 deletions(-)
diff --git a/engines/e_padlock.c b/engines/e_padlock.c
index 94406cb..5e99114 100644
--- a/engines/e_padlock.c
+++ b/engines/e_padlock.c
@@ -3,6 +3,9 @@
* Written by Michal Ludvig <michal@logix.cz>
* http://www.logix.cz/michal
*
+ * SHA support by Timo Teras <timo.teras@iki.fi>. Portions based on
+ * code originally written by Michal Ludvig.
+ *
* Big thanks to Andy Polyakov for a help with optimization,
* assembler fixes, port to MS Windows and a lot of other
* valuable work on this engine!
@@ -63,7 +66,9 @@
*/
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
+#include <netinet/in.h>
#include <openssl/opensslconf.h>
#include <openssl/crypto.h>
@@ -73,11 +78,32 @@
#ifndef OPENSSL_NO_AES
# include <openssl/aes.h>
#endif
+#ifndef OPENSSL_NO_SHA
+# include <openssl/sha.h>
+#endif
#include <openssl/rand.h>
#include <openssl/err.h>
#ifndef OPENSSL_NO_HW
-# ifndef OPENSSL_NO_HW_PADLOCK
+# ifndef OPENSSL_NO_HW_PADLOCK
+
+/* PadLock RNG is disabled by default */
+# define PADLOCK_NO_RNG 1
+
+/* No ASM routines for SHA in MSC yet */
+# ifdef _MSC_VER
+# define OPENSSL_NO_SHA
+# endif
+
+/* 64-bit mode does not need software SHA1 as fallback, we can
+ * do all operations with padlock */
+# if defined(__x86_64__) || defined(__x86_64)
+# define PADLOCK_NEED_FALLBACK_SHA 0
+# else
+# define PADLOCK_NEED_FALLBACK_SHA 1
+# endif
+
+# define PADLOCK_MAX_FINALIZING_LENGTH 0x1FFFFFFE
/* Attempt to have a single source for both 0.9.7 and 0.9.8 :-) */
# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
@@ -151,60 +177,42 @@ void ENGINE_load_padlock(void)
static int padlock_available(void);
static int padlock_init(ENGINE *e);
+# ifndef PADLOCK_NO_RNG
/* RNG Stuff */
static RAND_METHOD padlock_rand;
-
-/* Cipher Stuff */
-# ifndef OPENSSL_NO_AES
-static int padlock_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
- const int **nids, int nid);
# endif
/* Engine names */
static const char *padlock_id = "padlock";
static char padlock_name[100];
+static int padlock_bind_helper(ENGINE *e);
+
/* Available features */
-static int padlock_use_ace = 0; /* Advanced Cryptography Engine */
-static int padlock_use_rng = 0; /* Random Number Generator */
+enum padlock_flags {
+ PADLOCK_RNG = 0x01,
+ PADLOCK_ACE = 0x02,
+ PADLOCK_ACE2 = 0x04,
+ PADLOCK_PHE = 0x08,
+ PADLOCK_PMM = 0x10,
+ PADLOCK_NANO = 0x20,
+};
+enum padlock_flags padlock_flags;
+
+#define PADLOCK_HAVE_RNG (padlock_flags & PADLOCK_RNG)
+#define PADLOCK_HAVE_ACE (padlock_flags & (PADLOCK_ACE|PADLOCK_ACE2))
+#define PADLOCK_HAVE_ACE1 (padlock_flags & PADLOCK_ACE)
+#define PADLOCK_HAVE_ACE2 (padlock_flags & PADLOCK_ACE2)
+#define PADLOCK_HAVE_PHE (padlock_flags & PADLOCK_PHE)
+#define PADLOCK_HAVE_PMM (padlock_flags & PADLOCK_PMM)
+#define PADLOCK_HAVE_NANO (padlock_flags & PADLOCK_NANO)
+
# ifndef OPENSSL_NO_AES
static int padlock_aes_align_required = 1;
# endif
/* ===== Engine "management" functions ===== */
-/* Prepare the ENGINE structure for registration */
-static int padlock_bind_helper(ENGINE *e)
-{
- /* Check available features */
- padlock_available();
-
-# if 1 /* disable RNG for now, see commentary in
- * vicinity of RNG code */
- padlock_use_rng = 0;
-# endif
-
- /* Generate a nice engine name with available features */
- BIO_snprintf(padlock_name, sizeof(padlock_name),
- "VIA PadLock (%s, %s)",
- padlock_use_rng ? "RNG" : "no-RNG",
- padlock_use_ace ? "ACE" : "no-ACE");
-
- /* Register everything or return with an error */
- if (!ENGINE_set_id(e, padlock_id) ||
- !ENGINE_set_name(e, padlock_name) ||
- !ENGINE_set_init_function(e, padlock_init) ||
-# ifndef OPENSSL_NO_AES
- (padlock_use_ace && !ENGINE_set_ciphers(e, padlock_ciphers)) ||
-# endif
- (padlock_use_rng && !ENGINE_set_RAND(e, &padlock_rand))) {
- return 0;
- }
-
- /* Everything looks good */
- return 1;
-}
-
# ifdef OPENSSL_NO_DYNAMIC_ENGINE
/* Constructor */
@@ -229,7 +237,7 @@ static ENGINE *ENGINE_padlock(void)
/* Check availability of the engine */
static int padlock_init(ENGINE *e)
{
- return (padlock_use_rng || padlock_use_ace);
+ return padlock_flags;
}
/*
@@ -377,10 +385,20 @@ static int padlock_available(void)
"=d"(edx)::"ecx");
/* Fill up some flags */
- padlock_use_ace = ((edx & (0x3 << 6)) == (0x3 << 6));
- padlock_use_rng = ((edx & (0x3 << 2)) == (0x3 << 2));
-
- return padlock_use_ace + padlock_use_rng;
+ padlock_flags |= ((edx & (0x3<<3)) ? PADLOCK_RNG : 0);
+ padlock_flags |= ((edx & (0x3<<7)) ? PADLOCK_ACE : 0);
+ padlock_flags |= ((edx & (0x3<<9)) ? PADLOCK_ACE2 : 0);
+ padlock_flags |= ((edx & (0x3<<11)) ? PADLOCK_PHE : 0);
+ padlock_flags |= ((edx & (0x3<<13)) ? PADLOCK_PMM : 0);
+
+ /* Check for VIA Nano CPU */
+ eax = 0x00000001;
+ asm volatile ("pushl %%ebx; cpuid; popl %%ebx"
+ : "+a"(eax) : : "ecx", "edx");
+ if ((eax | 0x000F) == 0x06FF)
+ padlock_flags |= PADLOCK_NANO;
+
+ return padlock_flags;
}
/*
@@ -473,10 +491,14 @@ padlock_available(void)
: "+a"(eax), "=d"(edx) : : "rbx", "rcx");
/* Fill up some flags */
- padlock_use_ace = ((edx & (0x3<<6)) == (0x3<<6));
- padlock_use_rng = ((edx & (0x3<<2)) == (0x3<<2));
-
- return padlock_use_ace + padlock_use_rng;
+ padlock_flags |= ((edx & (0x3<<3)) ? PADLOCK_RNG : 0);
+ padlock_flags |= ((edx & (0x3<<7)) ? PADLOCK_ACE : 0);
+ padlock_flags |= ((edx & (0x3<<9)) ? PADLOCK_ACE2 : 0);
+ padlock_flags |= ((edx & (0x3<<11)) ? PADLOCK_PHE : 0);
+ padlock_flags |= ((edx & (0x3<<13)) ? PADLOCK_PMM : 0);
+ padlock_flags |= PADLOCK_NANO;
+
+ return padlock_flags;
}
/* Force key reload from memory to the CPU microcode.
@@ -1293,6 +1315,496 @@ padlock_aes_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out_arg,
# endif /* OPENSSL_NO_AES */
+#ifndef OPENSSL_NO_SHA
+
+static inline void
+padlock_copy_bswap(void *dst, void *src, size_t count)
+{
+ uint32_t *udst = dst, *usrc = src;
+ int i = 0;
+
+ for (i = 0; i < count; i++)
+ udst[i] = htonl(usrc[i]);
+}
+
+static unsigned long padlock_sha_prepare_padding(
+ EVP_MD_CTX *ctx,
+ unsigned char *padding,
+ unsigned char *data, size_t data_len,
+ uint64_t total)
+{
+ unsigned int padding_len;
+
+ padding_len = data_len < 56 ? SHA_CBLOCK : 2 * SHA_CBLOCK;
+ if (data_len)
+ memcpy(padding, data, data_len);
+
+ memset(padding + data_len, 0, padding_len - data_len);
+ padding[data_len] = 0x80;
+ *(uint32_t *)(padding + padding_len - 8) = htonl(total >> 32);
+ *(uint32_t *)(padding + padding_len - 4) = htonl(total & 0xffffffff);
+
+ return data_len < 56 ? 1 : 2;
+}
+
+#define PADLOCK_SHA_ALIGN(dd) (uint32_t*)(((uintptr_t)(dd) + 15) & ~15)
+#define PADLOCK_SHA_HWCTX (128+16)
+
+static void
+padlock_sha1(void *hwctx, const void *buf, unsigned long total, unsigned long now)
+{
+ unsigned long pos = total - now;
+
+ asm volatile ("xsha1"
+ : "+S"(buf), "+D"(hwctx), "+a"(pos), "+c"(total)
+ : : "memory");
+}
+
+static void
+padlock_sha1_partial(void *hwctx, const void *buf, unsigned long blocks)
+{
+ asm volatile ("xsha1"
+ : "+S"(buf), "+D"(hwctx), "+c"(blocks)
+ : "a"(-1L) : "memory");
+}
+
+static int padlock_sha1_init(EVP_MD_CTX *ctx)
+{
+ return SHA1_Init(ctx->md_data);
+}
+
+#if PADLOCK_NEED_FALLBACK_SHA
+
+static int padlock_sha1_update_eden(EVP_MD_CTX *ctx, const void *data,
+ size_t len)
+{
+ unsigned char hwctx[PADLOCK_SHA_HWCTX];
+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx);
+ SHA_CTX *c = ctx->md_data;
+ uint_fast64_t total;
+ const unsigned char *p = data;
+ unsigned long l = 0;
+
+ /* Calculate total length (Nl,Nh) is length in bits */
+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3);
+ total += len;
+
+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) &&
+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) {
+ if (c->num != 0) {
+ l = (len < SHA_CBLOCK - c->num) ? len : (SHA_CBLOCK - c->num);
+ if (!SHA1_Update(c, data, l))
+ return 0;
+ p += l;
+ if (c->num != 0) {
+ p = (unsigned char *) c->data;
+ len = c->num;
+ l = 0;
+ }
+ }
+ memcpy(aligned, &c->h0, 5 * sizeof(SHA_LONG));
+ padlock_sha1(aligned, p, total, len - l);
+ memcpy(&c->h0, aligned, 5 * sizeof(SHA_LONG));
+ c->num = -1;
+ return 1;
+ }
+
+ return SHA1_Update(c, data, len);
+}
+#endif
+
+static int padlock_sha1_update(EVP_MD_CTX *ctx, const void *data,
+ size_t len)
+{
+ unsigned char hwctx[PADLOCK_SHA_HWCTX];
+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx);
+ SHA_CTX *c = ctx->md_data;
+ uint_fast64_t total;
+ unsigned char *p;
+ unsigned long n;
+
+ /* Calculate total length (Nl,Nh) is length in bits */
+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3);
+ total += len;
+ c->Nh = total >> 29;
+ c->Nl = (total << 3) & 0xffffffffUL;
+
+ memcpy(aligned, &c->h0, 5 * sizeof(SHA_LONG));
+
+ /* Check partial data */
+ n = c->num;
+ if (n) {
+ p = (unsigned char *) c->data;
+ if (len >= SHA_CBLOCK || len+n >= SHA_CBLOCK) {
+ memcpy(p+n, data, SHA_CBLOCK-n);
+ padlock_sha1_partial(aligned, p, 1);
+ n = SHA_CBLOCK - n;
+ data += n;
+ len -= n;
+ c->num = 0;
+ memset(p, 0, SHA_CBLOCK);
+ } else {
+ memcpy(p+n, data, len);
+ c->num += (unsigned int)len;
+ return 1;
+ }
+ }
+
+ /* Can we finalize straight away? */
+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) &&
+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) {
+ padlock_sha1(aligned, data, total, len);
+ memcpy(&c->h0, aligned, 5 * sizeof(SHA_LONG));
+ c->num = -1;
+ return 1;
+ }
+
+ /* Use nonfinalizing update */
+ n = len / SHA_CBLOCK;
+ if (n != 0) {
+ padlock_sha1_partial(aligned, data, n);
+ data += n * SHA_CBLOCK;
+ len -= n * SHA_CBLOCK;
+ }
+ memcpy(&c->h0, aligned, 5 * sizeof(SHA_LONG));
+
+ /* Buffer remaining bytes */
+ if (len) {
+ memcpy(c->data, data, len);
+ c->num = len;
+ }
+
+ return 1;
+}
+
+static int padlock_sha1_final(EVP_MD_CTX *ctx, unsigned char *md)
+{
+ unsigned char hwctx[PADLOCK_SHA_HWCTX];
+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx);
+ uint64_t total;
+ SHA_CTX *c = ctx->md_data;
+
+ if (c->num == -1) {
+ padlock_copy_bswap(md, &c->h0, 5);
+ c->num = 0;
+ return 1;
+ }
+
+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3);
+#if PADLOCK_NEED_FALLBACK_SHA
+ if ((!PADLOCK_HAVE_NANO) && (total > PADLOCK_MAX_FINALIZING_LENGTH))
+ return SHA1_Final(md, c);
+#endif
+
+ memcpy(aligned, &c->h0, 5 * sizeof(SHA_LONG));
+ if (total > PADLOCK_MAX_FINALIZING_LENGTH) {
+ unsigned char padding[2 * SHA_CBLOCK];
+ unsigned long n;
+
+ n = padlock_sha_prepare_padding(ctx, padding,
+ (unsigned char *) c->data, c->num, total << 3);
+ padlock_sha1_partial(aligned, padding, n);
+ } else {
+ padlock_sha1(aligned, c->data, total, c->num);
+ }
+ padlock_copy_bswap(md, aligned, 5);
+ c->num = 0;
+
+ return 1;
+}
+
+static EVP_MD padlock_sha1_md = {
+ NID_sha1,
+ NID_sha1WithRSAEncryption,
+ SHA_DIGEST_LENGTH,
+ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE,
+ padlock_sha1_init,
+ padlock_sha1_update,
+ padlock_sha1_final,
+ NULL,
+ NULL,
+ EVP_PKEY_RSA_method,
+ SHA_CBLOCK,
+ sizeof(SHA_CTX),
+};
+
+static EVP_MD padlock_dss1_md = {
+ NID_dsa,
+ NID_dsaWithSHA1,
+ SHA_DIGEST_LENGTH,
+ 0,
+ padlock_sha1_init,
+ padlock_sha1_update,
+ padlock_sha1_final,
+ NULL,
+ NULL,
+ EVP_PKEY_DSA_method,
+ SHA_CBLOCK,
+ sizeof(SHA_CTX),
+};
+
+
+#if !defined(OPENSSL_NO_SHA256)
+
+static void
+padlock_sha256(void *hwctx, const void *buf, unsigned long total, unsigned long now)
+{
+ unsigned long pos = total - now;
+
+ asm volatile ("xsha256"
+ : "+S"(buf), "+D"(hwctx), "+a"(pos), "+c"(total)
+ : : "memory");
+}
+
+static void
+padlock_sha256_partial(void *hwctx, const void *buf, unsigned long blocks)
+{
+ asm volatile ("xsha256"
+ : "+S"(buf), "+D"(hwctx), "+c"(blocks)
+ : "a"(-1L) : "memory");
+}
+
+#if PADLOCK_NEED_FALLBACK_SHA
+
+static int padlock_sha256_update_eden(EVP_MD_CTX *ctx, const void *data,
+ size_t len)
+{
+ unsigned char hwctx[PADLOCK_SHA_HWCTX];
+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx);
+ SHA256_CTX *c = ctx->md_data;
+ uint_fast64_t total;
+ const unsigned char *p = data;
+ unsigned int l = 0;
+
+ /* Calculate total length (Nl,Nh) is length in bits */
+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3);
+ total += len;
+
+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) &&
+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) {
+ if (c->num != 0) {
+ l = (len < SHA256_CBLOCK - c->num) ? len : (SHA256_CBLOCK - c->num);
+ if (!SHA256_Update(c, data, l))
+ return 0;
+ p += l;
+ if (c->num != 0) {
+ p = (unsigned char *) c->data;
+ len = c->num;
+ l = 0;
+ }
+ }
+ memcpy(aligned, c->h, sizeof(c->h));
+ padlock_sha256(aligned, p, total, len - l);
+ memcpy(c->h, aligned, sizeof(c->h));
+ c->num = -1;
+ return 1;
+ }
+
+ return SHA256_Update(c, data, len);
+}
+
+#endif
+
+static int padlock_sha256_update(EVP_MD_CTX *ctx, const void *data,
+ size_t len)
+{
+ unsigned char hwctx[PADLOCK_SHA_HWCTX];
+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx);
+ SHA256_CTX *c = ctx->md_data;
+ uint_fast64_t total;
+ unsigned char *p;
+ unsigned long n;
+
+ /* Calculate total length (Nl,Nh) is length in bits */
+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3);
+ total += len;
+ c->Nh = total >> 29;
+ c->Nl = (total << 3) & 0xffffffffUL;
+
+ memcpy(aligned, c->h, sizeof(c->h));
+
+ /* Check partial data */
+ n = c->num;
+ if (n) {
+ p = (unsigned char *) c->data;
+ if (len >= SHA256_CBLOCK || len+n >= SHA256_CBLOCK) {
+ memcpy(p+n, data, SHA256_CBLOCK-n);
+ padlock_sha256_partial(aligned, p, 1);
+ n = SHA256_CBLOCK - n;
+ data += n;
+ len -= n;
+ c->num = 0;
+ memset(p, 0, SHA256_CBLOCK);
+ } else {
+ memcpy(p+n, data, len);
+ c->num += (unsigned int)len;
+ return 1;
+ }
+ }
+
+ /* Can we finalize straight away? */
+ if ((ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) &&
+ (total <= PADLOCK_MAX_FINALIZING_LENGTH)) {
+ padlock_sha256(aligned, data, total, len);
+ memcpy(c->h, aligned, sizeof(c->h));
+ c->num = -1;
+ return 1;
+ }
+
+ /* Use nonfinalizing update */
+ n = len / SHA256_CBLOCK;
+ if (n != 0) {
+ padlock_sha256_partial(aligned, data, n);
+ data += n * SHA256_CBLOCK;
+ len -= n * SHA256_CBLOCK;
+ }
+ memcpy(c->h, aligned, sizeof(c->h));
+
+ /* Buffer remaining bytes */
+ if (len) {
+ memcpy(c->data, data, len);
+ c->num = len;
+ }
+
+ return 1;
+}
+
+static int padlock_sha256_final(EVP_MD_CTX *ctx, unsigned char *md)
+{
+ unsigned char hwctx[PADLOCK_SHA_HWCTX];
+ uint32_t *aligned = PADLOCK_SHA_ALIGN(hwctx);
+ uint64_t total;
+ SHA256_CTX *c = ctx->md_data;
+
+ if (c->num == -1) {
+ padlock_copy_bswap(md, c->h, sizeof(c->h)/sizeof(c->h[0]));
+ c->num = 0;
+ return 1;
+ }
+
+ total = (((uint_fast64_t) c->Nh) << 29) + (c->Nl >> 3);
+#if PADLOCK_NEED_FALLBACK_SHA
+ if ((!PADLOCK_HAVE_NANO) && (total > PADLOCK_MAX_FINALIZING_LENGTH))
+ return SHA256_Final(md, c);
+#endif
+
+ memcpy(aligned, c->h, sizeof(c->h));
+ if (total > PADLOCK_MAX_FINALIZING_LENGTH) {
+ unsigned char padding[2 * SHA_CBLOCK];
+ unsigned long n;
+
+ n = padlock_sha_prepare_padding(ctx, padding,
+ (unsigned char *) c->data, c->num, total << 3);
+ padlock_sha256_partial(aligned, padding, n);
+ } else {
+ padlock_sha256(aligned, c->data, total, c->num);
+ }
+ padlock_copy_bswap(md, aligned, sizeof(c->h)/sizeof(c->h[0]));
+ c->num = 0;
+ return 1;
+}
+
+#if !defined(OPENSSL_NO_SHA224)
+
+static int padlock_sha224_init(EVP_MD_CTX *ctx)
+{
+ return SHA224_Init(ctx->md_data);
+}
+
+static EVP_MD padlock_sha224_md = {
+ NID_sha224,
+ NID_sha224WithRSAEncryption,
+ SHA224_DIGEST_LENGTH,
+ 0,
+ padlock_sha224_init,
+ padlock_sha256_update,
+ padlock_sha256_final,
+ NULL,
+ NULL,
+ EVP_PKEY_RSA_method,
+ SHA_CBLOCK,
+ sizeof(SHA256_CTX),
+};
+#endif /* !OPENSSL_NO_SHA224 */
+
+static int padlock_sha256_init(EVP_MD_CTX *ctx)
+{
+ return SHA256_Init(ctx->md_data);
+}
+
+static EVP_MD padlock_sha256_md = {
+ NID_sha256,
+ NID_sha256WithRSAEncryption,
+ SHA256_DIGEST_LENGTH,
+ 0,
+ padlock_sha256_init,
+ padlock_sha256_update,
+ padlock_sha256_final,
+ NULL,
+ NULL,
+ EVP_PKEY_RSA_method,
+ SHA_CBLOCK,
+ sizeof(SHA256_CTX),
+};
+#endif /* !OPENSSL_NO_SHA256 */
+
+static int padlock_digest_nids[] = {
+#if !defined(OPENSSL_NO_SHA)
+ NID_sha1,
+ NID_dsa,
+#endif
+#if !defined(OPENSSL_NO_SHA256)
+#if !defined(OPENSSL_NO_SHA224)
+ NID_sha224,
+#endif
+ NID_sha256,
+#endif
+};
+
+static int padlock_digest_nids_num = sizeof(padlock_digest_nids)/sizeof(padlock_digest_nids[0]);
+
+static int
+padlock_digests (ENGINE *e, const EVP_MD **digest, const int **nids, int nid)
+{
+ /* No specific digest => return a list of supported nids ... */
+ if (!digest) {
+ *nids = padlock_digest_nids;
+ return padlock_digest_nids_num;
+ }
+
+ /* ... or the requested "digest" otherwise */
+ switch (nid) {
+#if !defined(OPENSSL_NO_SHA)
+ case NID_sha1:
+ *digest = &padlock_sha1_md;
+ break;
+ case NID_dsa:
+ *digest = &padlock_dss1_md;
+ break;
+#endif
+#if !defined(OPENSSL_NO_SHA256)
+#if !defined(OPENSSL_NO_SHA224)
+ case NID_sha224:
+ *digest = &padlock_sha224_md;
+ break;
+#endif /* OPENSSL_NO_SHA224 */
+ case NID_sha256:
+ *digest = &padlock_sha256_md;
+ break;
+#endif /* OPENSSL_NO_SHA256 */
+ default:
+ /* Sorry, we don't support this NID */
+ *digest = NULL;
+ return 0;
+ }
+
+ return 1;
+}
+
+#endif /* OPENSSL_NO_SHA */
+
+#ifndef PADLOCK_NO_RNG
+
/* ===== Random Number Generator ===== */
/*
* This code is not engaged. The reason is that it does not comply
@@ -1356,6 +1868,59 @@ static RAND_METHOD padlock_rand = {
padlock_rand_bytes, /* pseudorand */
padlock_rand_status, /* rand status */
};
+#endif /* PADLOCK_NO_RNG */
+
+/* Prepare the ENGINE structure for registration */
+static int
+padlock_bind_helper(ENGINE *e)
+{
+ /* Check available features */
+ padlock_available();
+
+ /* Generate a nice engine name with available features */
+ BIO_snprintf(padlock_name, sizeof(padlock_name),
+ "VIA PadLock: %s%s%s%s%s%s",
+ padlock_flags ? "" : "not supported",
+ PADLOCK_HAVE_RNG ? "RNG " : "",
+ PADLOCK_HAVE_ACE ? (PADLOCK_HAVE_ACE2 ? "ACE2 " : "ACE ") : "",
+ PADLOCK_HAVE_PHE ? "PHE " : "",
+ PADLOCK_HAVE_PMM ? "PMM " : "",
+ PADLOCK_HAVE_NANO ? "NANO " : ""
+ );
+
+#if PADLOCK_NEED_FALLBACK_SHA && !defined(OPENSSL_NO_SHA)
+ if (!PADLOCK_HAVE_NANO) {
+ padlock_sha1_md.update = padlock_sha1_update_eden;
+ padlock_dss1_md.update = padlock_sha1_update_eden;
+#if !defined(OPENSSL_NO_SHA256)
+#if !defined(OPENSSL_NO_SHA224)
+ padlock_sha224_md.update = padlock_sha256_update_eden;
+#endif
+ padlock_sha256_md.update = padlock_sha256_update_eden;
+#endif
+ }
+#endif
+
+ /* Register everything or return with an error */
+ if (!ENGINE_set_id(e, padlock_id) ||
+ !ENGINE_set_name(e, padlock_name) ||
+ !ENGINE_set_init_function(e, padlock_init)
+#ifndef OPENSSL_NO_AES
+ || (PADLOCK_HAVE_ACE && !ENGINE_set_ciphers (e, padlock_ciphers))
+#endif
+#ifndef OPENSSL_NO_SHA
+ || (PADLOCK_HAVE_PHE && !ENGINE_set_digests (e, padlock_digests))
+#endif
+#ifndef PADLOCK_NO_RNG
+ || (PADLOCK_HAVE_RNG && !ENGINE_set_RAND (e, &padlock_rand))
+#endif
+ ) {
+ return 0;
+ }
+
+ /* Everything looks good */
+ return 1;
+}
# else /* !COMPILE_HW_PADLOCK */
# ifndef OPENSSL_NO_DYNAMIC_ENGINE
--
2.2.2

View file

@ -0,0 +1,33 @@
From a58658f191e83f4c6417d2cc879fa572f7978537 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 4 Feb 2016 16:28:15 +0100
Subject: [PATCH] crypto/engine: autoload padlock dynamic engine
---
crypto/engine/eng_all.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c
index 48ad0d2..822aa23 100644
--- a/crypto/engine/eng_all.c
+++ b/crypto/engine/eng_all.c
@@ -120,6 +120,16 @@ void ENGINE_load_builtin_engines(void)
ENGINE_load_capi();
# endif
#endif
+#ifdef OPENSSL_NO_STATIC_ENGINE
+ {
+ ENGINE *e = ENGINE_by_id("padlock");
+ if (e != NULL) {
+ ENGINE_add(e);
+ ENGINE_free(e);
+ ERR_clear_error();
+ }
+ }
+#endif
ENGINE_register_all_complete();
}
--
2.7.0

View file

@ -0,0 +1,151 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=openssl10
_pkgname=openssl
pkgver=1.0.2o
pkgrel=1
pkgdesc="Toolkit for SSL v2/v3 and TLS v1"
url="http://openssl.org"
depends=
makedepends_build="perl"
makedepends_host="zlib-dev"
makedepends="$makedepends_host $makedepends_build"
depends_dev="zlib-dev"
arch="all"
license="openssl"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libcrypto1.0:libcrypto libssl1.0:libssl"
source="http://www.openssl.org/source/${_pkgname}-${pkgver}.tar.gz
0002-busybox-basename.patch
0003-use-termios.patch
0004-fix-default-ca-path-for-apps.patch
0005-fix-parallel-build.patch
0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch
0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch
0009-no-rpath.patch
0010-ssl-env-zlib.patch
1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch
1002-backport-changes-from-upstream-padlock-module.patch
1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
CVE-2018-0732.patch
"
# secfixes:
# 1.0.2h-r0:
# - CVE-2016-2107
# - CVE-2016-2105
# - CVE-2016-2106
# - CVE-2016-2109
# - CVE-2016-2176
# 1.0.2h-r1:
# - CVE-2016-2177
# - CVE-2016-2178
# 1.0.2h-r2:
# - CVE-2016-2180
# 1.0.2h-r3:
# - CVE-2016-2179
# - CVE-2016-2182
# - CVE-2016-6302
# - CVE-2016-6303
# 1.0.2h-r4:
# - CVE-2016-2181
# 1.0.2i-r0:
# - CVE-2016-2183
# - CVE-2016-6304
# - CVE-2016-6306
# 1.0.2m-r0:
# - CVE-2017-3735
# - CVE-2017-3736
# 1.0.2n-r0:
# - CVE-2017-3737
# - CVE-2017-3738
# 1.0.2o-r0:
# - CVE-2017-3738
# - CVE-2018-0733
# - CVE-2018-0739
# 1.0.2o-r1:
# - CVE-2018-0732
builddir="$srcdir"/$_pkgname-$pkgver
build() {
local _target _optflags
cd "$builddir"
# openssl will prepend crosscompile always core CC et al
CC=${CC#${CROSS_COMPILE}}
CXX=${CXX#${CROSS_COMPILE}}
CPP=${CPP#${CROSS_COMPILE}}
# determine target OS for openssl
case "$CARCH" in
aarch64*) _target="linux-aarch64" ;;
arm*) _target="linux-armv4" ;;
ppc64le) _target="linux-ppc64le" ;;
x86) _target="linux-elf" ;;
x86_64) _target="linux-x86_64"; _optflags="enable-ec_nistp_64_gcc_128" ;;
s390x) _target="linux64-s390x";;
*) msg "Unable to determine architecture from (CARCH=$CARCH)" ; return 1 ;;
esac
# Configure assumes --options are for it, so can't use
# gcc's --sysroot fake this by overriding CC
[ -n "$CBUILDROOT" ] && CC="$CC --sysroot=${CBUILDROOT}"
perl ./Configure $_target --prefix=/usr \
--libdir=lib \
--openssldir=/etc/ssl \
shared zlib enable-montasm enable-md2 $_optflags \
-DOPENSSL_NO_BUF_FREELISTS \
$CPPFLAGS $CFLAGS $LDFLAGS -Wa,--noexecstack \
enable-ssl2
make && make build-shared
}
check() {
cd "$builddir"
make -j1 test
}
package() {
cd "$builddir"
make INSTALL_PREFIX="$pkgdir" MANDIR=/usr/share/man MANSUFFIX=ssl install
# remove the script c_rehash
rm "$pkgdir"/usr/bin/c_rehash
}
libcrypto() {
pkgdesc="Crypto library from openssl"
mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib
for i in "$pkgdir"/usr/lib/libcrypto*; do
mv $i "$subpkgdir"/lib/
ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/}
done
mv "$pkgdir"/usr/lib/engines "$subpkgdir"/usr/lib/
}
libssl() {
pkgdesc="SSL shared libraries"
mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib
for i in "$pkgdir"/usr/lib/libssl*; do
mv $i "$subpkgdir"/lib/
ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/}
done
}
sha512sums="8a2c93657c85143e76785bb32ee836908c31a6f5f8db993fa9777acba6079e630cdddd03edbad65d1587199fc13a1507789eacf038b56eb99139c2091d9df7fd openssl-1.0.2o.tar.gz
2244f46cb18e6b98f075051dd2446c47f7590abccd108fbab707f168a20cad8d32220d704635973f09e3b2879f523be5160f1ffbc12ab3900f8a8891dc855c5c 0002-busybox-basename.patch
58e42058a0c8086c49d681b1e226da39a8cf8cb88c51cf739dec2ff12e1bb5d7208ac5033264b186d58e9bdfe992fe9ddb95701d01caf1824396b2cefe30c0a4 0003-use-termios.patch
c67472879a31b5dbdd313892df6d37e7c93e8c0237d406c30d50b1016c2618ead3c13277f5dc723ef1ceed092d36e3c15a9777daa844f59b9fa2b0a4f04fd9ae 0004-fix-default-ca-path-for-apps.patch
5d4191482f8bbf62c75fe6bc2d9587388022c3310703c2a913788a983b1d1406e706cf3916a5792604f0b0f220a87432d3b82b442cea9915f2abb6fdd8478fcb 0005-fix-parallel-build.patch
820d4ce1c222696fe3f1dd0d11815c06262ec230fdb174532fd507286667a0aefbf858ea5edac4245a54b950cd0556545ecd0c5cf494692a2ba131c667e7bcd5 0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch
17ad683bb91a3a3c5bcc456c8aed7f0b42414c6de06ebafa4753af93c42d9827c9978a43d4d53d741a45df7f7895c6f6163172af57cc7b391cfd15f45ce6c351 0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch
5dbbc01985190ae1254350fb12565beb6abb916b6a7bb1f0f22d9762b1e575d124aaf9aa4cfe5f908e420978f691072d48c61a72660f09dfd6d9a2f83f862bc1 0009-no-rpath.patch
5febe20948e3f12d981e378e1f4ea538711657aacb6865a1aa91339d4a04277e250f490a1f2abc2c6f290bdc2b1bffdba1d00983b4c09f7ea983eef8163f9420 0010-ssl-env-zlib.patch
8c181760d7a149aa18d246d50f1c0438ffb63c98677b05306dfc00400ad0429b47d31e7c8d85126005c67f743d23e7a8a81174ffe98556f4caf9cf6b04d9ff17 1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch
a3555440b5f544bfd6b9ad97557d8f4c1d673f6a35219f65056a72035d186be5f354717ddf9784899b602464d48657b090ade24379552d43af97609c0f48c389 1002-backport-changes-from-upstream-padlock-module.patch
6353c7a94016c20db5d683dde37775f6780952ecdb1a5f39f878d04ba37f6ad79ae10fb6d65d181d912505a5d1e22463004cd855d548b364c00b120da2b0fdbc 1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
ff91298629f157496a012da00ba7325923f5d087bfa54b60e205bf2dfb06374e958912e0df39dbdf39773555455c1a3afa3dcde1ddfec6e85cf89b0b62cc0eb4 CVE-2018-0732.patch"

View file

@ -0,0 +1,39 @@
From 3984ef0b72831da8b3ece4745cac4f8575b19098 Mon Sep 17 00:00:00 2001
From: Guido Vranken <guidovranken@gmail.com>
Date: Mon, 11 Jun 2018 19:38:54 +0200
Subject: [PATCH] Reject excessively large primes in DH key generation.
CVE-2018-0732
Signed-off-by: Guido Vranken <guidovranken@gmail.com>
(cherry picked from commit 91f7361f47b082ae61ffe1a7b17bb2adf213c7fe)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6457)
---
crypto/dh/dh_key.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c
index 387558f1467..f235e0d682b 100644
--- a/crypto/dh/dh_key.c
+++ b/crypto/dh/dh_key.c
@@ -130,10 +130,15 @@ static int generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH_F_GENERATE_KEY, DH_R_MODULUS_TOO_LARGE);
+ return 0;
+ }
+
ctx = BN_CTX_new();
if (ctx == NULL)
goto err;

View file

@ -0,0 +1,43 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname='organizr'
_pkgname='Organizr'
pkgver=20200712
pkgrel=1
pkgdesc='HTPC/HomeLab services organizer.'
arch="noarch"
url='https://github.com/causefx/Organizr'
license='GPL3'
depends='php7-sqlite3 php7'
install="$pkgname.post-install $pkgname.post-upgrade"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/causefx/Organizr"
_gittag="00e3b99f641fa3853dbcb4db78743b09163d798a"
builddir="$srcdir/$pkgname"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o $pkgname.tar --format "tar" $_gittag
gzip $pkgname.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
package() {
install -dm 755 "${pkgdir}/usr/share/webapps/${pkgname}"
install -dm 755 "${pkgdir}/var/lib/${pkgname}"
cp -r "${srcdir}/${pkgname}/"* "${pkgdir}/usr/share/webapps/${pkgname}"
}
sha512sums="10f9085326f91d7dd3fb225b37ea69125599ec48ed7784fee163c1f35f2e2bd8f3f06f0c089d8df3e238e35881d0965858d84b442466c129c69d6fd161a6230b organizr-20200712.tar.gz"

View file

@ -0,0 +1,12 @@
#!/bin/sh
echo '-------------------------------------------------------------------------------'
echo 'Once you have added Organizr to your web server configuration, browse to'
echo '<Your Organizer URL>/check.php to see if you need to enable any PHP extensions.'
echo
echo 'The directory /var/lib/organizr was created to store your Organizr database.'
echo 'Specify this directory as the Database Path when visiting the main site for the'
echo 'first time.'
echo '-------------------------------------------------------------------------------'
chown -R http:http /usr/share/webapps/organizr
chown -R http:http /var/lib/organizr

View file

@ -0,0 +1,3 @@
#!/bin/sh
chown -R http:http /usr/share/webapps/organizr
chown -R http:http /var/lib/organizr

View file

@ -0,0 +1,47 @@
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=papermc
_pkgver=1.16.5
_build=470
_license_commit=4a7962c
pkgver="${_pkgver}.${_build}"
pkgrel=5
pkgdesc="Next generation of Minecraft server, compatible with Spigot plugins and offering uncompromising performance"
arch='noarch'
url="https://papermc.io/"
license='custom'
depends='openjdk11-jre-headless screen sudo bash gawk sed netcat-openbsd tar'
backup='etc/conf.d/papermc'
install="${pkgname}.post-install"
source="papermc.${pkgver}.jar::https://papermc.io/api/v1/paper/${_pkgver}/${_build}/download
papermc.initd
papermc.conf
papermc.sh
LICENSE_${pkgver}.md"::"https://raw.githubusercontent.com/PaperMC/Paper/${_license_commit}/LICENSE.md"
noextract="papermc.${pkgver}.jar"
_game="papermc"
_server_root="/var/lib/papermc"
package() {
install -Dm644 ${srcdir}/${_game}.conf "${pkgdir}/etc/conf.d/${_game}"
install -Dm755 ${srcdir}/${_game}.sh "${pkgdir}/usr/bin/${_game}"
install -Dm755 ${srcdir}/${_game}.initd "${pkgdir}/etc/init.d/${_game}"
install -Dm644 ${srcdir}/${_game}.${pkgver}.jar "${pkgdir}/${_server_root}/${_game}.${pkgver}.jar"
ln -s "${_game}.${pkgver}.jar" "${pkgdir}${_server_root}/${_game}_server.jar"
# Link the log files
mkdir -p "${pkgdir}/var/log/"
install -dm2755 "${pkgdir}/${_server_root}/logs"
ln -s "${_server_root}/logs" "${pkgdir}/var/log/${_game}"
# Give the group write permissions and set user or group ID on execution
chmod g+ws "${pkgdir}${_server_root}"
install -D ${srcdir}/./LICENSE_${pkgver}.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
sha512sums="d59eb45880c4f3cfc7e14573f1ad0563d6977d90e8b40e598a5e6101696cc640078aac46fe215722777da5ceee50dbc0a3fe15428aca2087b281563f199efe5b papermc.1.16.5.470.jar
c5d1bf85ceb74162aaaf2bcd2d06dc2e3dd2e37c39f0cee2be7c8dbff9970a6aff1e48a43e6d1e83e6a0ac610bd89f62b1279bf27b64afa88d9831a36aebbd3e papermc.initd
8787e4d9c9f4c3e11cee75b714003c42c07ca64867a62f761fe8f4865acbee9ec877d22c1319f20dc6f8eaab8abf4bb43aa5f9d13fc551d8b80549ba90b2fc56 papermc.conf
943ba0d4c10173246bdc6497dcedd54da0788f966841c8d3381398711d79f8d5eb07a24ce28f519b6f24f59d99fa9e74bc6bb882059f343df4eeda5de3660ac7 papermc.sh
d4c645a58e1a17a0a1e42856a3cc43097711a05bf3d9f18c77c3bc9874417f223552859042ff00b7d3dda0003f49a9ee568540c2eb24e9f8fbb3c055f3b6e0a5 LICENSE_1.16.5.470.md"

View file

@ -0,0 +1,28 @@
# THIS IS THE CONFIGURATION FILE FOR THE MANAGING SCRIPT NOT FOR THE ACTUAL SERVER
# Variables are interpreted in bash. Simply using bash-syntax is sufficient.
# General parameters
SERVER_ROOT="/var/lib/papermc"
BACKUP_DEST="/var/lib/papermc/backup"
BACKUP_PATHS="world" # World paths separated by spaces relative to SERVER_ROOT
KEEP_BACKUPS="10"
GAME_USER="papermc"
MAIN_EXECUTABLE="papermc_server.jar"
SESSION_NAME="papermc"
# System parameters for java
# -Xms sets the intial heap size (must be a multiple of 1024 and greater than 2MB, no spaces!)
# -Xmx sets the maximum heap size (must be a multiple of 1024 and greater than 2MB, no spaces!)
# -XX:ParallelGCThreads defines the number of threads the server may use
SERVER_START_CMD="java -Xms512M -Xmx1024M -XX:ParallelGCThreads=1 -jar './${MAIN_EXECUTABLE}' nogui"
# System parameters for the actual game server
# Describes whether a daemon process which stops the server if it is not used by a player
# within IDLE_IF_TIME seconds should be started. The GAME_PORT is not inhereted to the server!
IDLE_SERVER=false # true or false
# Ensure that if SESSION_NAME is passed through the command line and therefore set to read only by the script,
# IDLE_SESSION_NAME gets altered according to the command line and not the configurtion file, hence invoke the variable
IDLE_SESSION_NAME="idle_server_${SESSION_NAME}"
GAME_PORT="25565" # used to listen for incoming connections when the server is down
CHECK_PLAYER_TIME="30" # in seconds
IDLE_IF_TIME="1200" # in seconds

View file

@ -0,0 +1,32 @@
#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License, v2 or later
PAPERMC_HOME=${PAPERMC_HOME:-/var/lib/${SVCNAME}}
PAPERMC_USER=${PAPERMC_USER:-${SVCNAME}}
PIDFILE=/run/papermc/papermc.pid
depend() {
after net
}
start() {
checkpath -dq -o papermc:papermc -m 755 /run/papermc/
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
--start --user "${PAPERMC_USER}" --name papermc \
--env HOME="${PAPERMC_HOME}" --exec /usr/bin/papermc \
--pidfile="${PIDFILE}" \
-- \
start
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --user "${PAPERMC_USER}" \
--pidfile "${PIDFILE}" \
--wait 15000 \
--progress
eend $?
}

Some files were not shown because too many files have changed in this diff Show more