summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/mkinitcpio-openswap/LICENSE21
-rw-r--r--pcr/mkinitcpio-openswap/PKGBUILD30
-rw-r--r--pcr/mkinitcpio-openswap/openswap.conf17
-rw-r--r--pcr/mkinitcpio-openswap/openswap.hook17
-rw-r--r--pcr/mkinitcpio-openswap/openswap.install27
-rw-r--r--pcr/mkinitcpio-openswap/usage.install9
-rw-r--r--pcr/pythonqt/PKGBUILD75
-rw-r--r--pcr/pythonqt/create_pkgconfig_file.patch9
-rw-r--r--pcr/pythonqt/fix_python_version.patch13
-rw-r--r--pcr/pythonqt/pkgconfig_file.prf12
10 files changed, 230 insertions, 0 deletions
diff --git a/pcr/mkinitcpio-openswap/LICENSE b/pcr/mkinitcpio-openswap/LICENSE
new file mode 100644
index 000000000..870dd6420
--- /dev/null
+++ b/pcr/mkinitcpio-openswap/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Fabio Tea
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/pcr/mkinitcpio-openswap/PKGBUILD b/pcr/mkinitcpio-openswap/PKGBUILD
new file mode 100644
index 000000000..fa71cff9d
--- /dev/null
+++ b/pcr/mkinitcpio-openswap/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: David P. <megver83@parabola.nu>
+# Contributor: Jenya Sovetkin <e.sovetkin@gmail.com>
+# Contributor: https://aur.archlinux.org/account/f4bio
+
+pkgname=mkinitcpio-openswap
+pkgver=0.1.0
+pkgrel=1
+pkgdesc="mkinitcpio hook to open swap at boot time"
+arch=(any)
+license=('unknown')
+url="https://aur.archlinux.org/packages/mkinitcpio-openswap/"
+depends=(mkinitcpio)
+backup=('etc/openswap.conf')
+install="usage.install"
+source=('openswap.hook'
+ 'openswap.install'
+ 'openswap.conf')
+sha256sums=('ec55cff2d8f71eae70535e706445edb41f416350245b7aa7b322581fd3b38bae'
+ '94dd98a953bab2244215a2b20767cdc9500fc438bed9ec27cae72a73766c6b86'
+ '3308f2679bb7c962d98adf2684d25390025d025e3d30bc1e773e3522311ad325')
+
+
+package() {
+ install -Dm 644 openswap.hook \
+ "${pkgdir}/usr/lib/initcpio/hooks/openswap"
+ install -Dm 644 openswap.install \
+ "${pkgdir}/usr/lib/initcpio/install/openswap"
+ install -Dm 644 openswap.conf \
+ "${pkgdir}/etc/openswap.conf"
+}
diff --git a/pcr/mkinitcpio-openswap/openswap.conf b/pcr/mkinitcpio-openswap/openswap.conf
new file mode 100644
index 000000000..b7e92e0e0
--- /dev/null
+++ b/pcr/mkinitcpio-openswap/openswap.conf
@@ -0,0 +1,17 @@
+## cryptsetup open $swap_device $crypt_swap_name
+## get uuid using e.g. lsblk -f
+swap_device=/dev/disk/by-uuid/2788eb78-074d-4424-9f1d-ebffc9c37262
+crypt_swap_name=cryptswap
+
+## one can optionally provide a keyfile device and path on this device
+## to the keyfile
+keyfile_device=/dev/mapper/cryptroot
+keyfile_filename=etc/keyfile-cryptswap
+
+## additional arguments are given to mount for keyfile_device
+## has to start with --options (if so desired)
+#keyfile_device_mount_options="--options=subvol=__active/__"
+
+## additional arguments are given to cryptsetup
+## --allow-discards options is desired in case swap is on SSD partition
+cryptsetup_options="--type luks"
diff --git a/pcr/mkinitcpio-openswap/openswap.hook b/pcr/mkinitcpio-openswap/openswap.hook
new file mode 100644
index 000000000..ead4c4f86
--- /dev/null
+++ b/pcr/mkinitcpio-openswap/openswap.hook
@@ -0,0 +1,17 @@
+run_hook ()
+{
+ ## read openswap configurations
+ source openswap.conf
+
+ if [ -z "$keyfile_device" ] || [ -z "$keyfile_filename" ]
+ then
+ ## case when no keyfile provided in configurations
+ cryptsetup open "$swap_device" "$crypt_swap_name"
+ else
+ ## case when keyfile is provided in configurations
+ mkdir openswap_keymount
+ mount $keyfile_device_mount_options "$keyfile_device" openswap_keymount
+ cryptsetup open $cryptsetup_options --key-file "openswap_keymount/$keyfile_filename" "$swap_device" "$crypt_swap_name"
+ umount openswap_keymount
+ fi
+}
diff --git a/pcr/mkinitcpio-openswap/openswap.install b/pcr/mkinitcpio-openswap/openswap.install
new file mode 100644
index 000000000..95d59a3d6
--- /dev/null
+++ b/pcr/mkinitcpio-openswap/openswap.install
@@ -0,0 +1,27 @@
+build ()
+{
+ grep "swap_device=" /etc/openswap.conf > "$BUILDROOT/openswap.conf"
+ grep "crypt_swap_name=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
+ grep "keyfile_device=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
+ grep "keyfile_filename=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
+ grep "keyfile_device_mount_options=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
+ grep "cryptsetup_options=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
+
+ source "$BUILDROOT/openswap.conf"
+
+ if [ -z "$swap_device" ]; then
+ warning "swap_device variable is not set"
+ fi
+
+ if [ -z "$crypt_swap_name" ]; then
+ warning "crypt_swap_name variable is not set"
+ fi
+
+ add_runscript
+}
+help ()
+{
+cat<<HELPEOF
+ This hook opens a swap at boot time
+HELPEOF
+}
diff --git a/pcr/mkinitcpio-openswap/usage.install b/pcr/mkinitcpio-openswap/usage.install
new file mode 100644
index 000000000..3610e9d28
--- /dev/null
+++ b/pcr/mkinitcpio-openswap/usage.install
@@ -0,0 +1,9 @@
+post_install() {
+ echo ""
+ echo "Alter /etc/openswap.conf file for your swap device name, keyfiles, etc..."
+ echo ""
+ echo "For more information see: https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#mkinitcpio_hook"
+ echo ""
+ echo "Don't forget to add the openswap hook after encrypt and before resume in your /etc/mkinitcpio.conf and run mkinitcpio -p linux..."
+ echo ""
+}
diff --git a/pcr/pythonqt/PKGBUILD b/pcr/pythonqt/PKGBUILD
new file mode 100644
index 000000000..c123198ba
--- /dev/null
+++ b/pcr/pythonqt/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: David P. <megver83@parabola.nu>
+# Contributor: Alfredo Ramos <alfredo dot ramos at yandex dot com>
+# Contributor: Chris <christopher.r.mullins g-mail>
+# Contributor: Ainola
+# Contributor: speps
+
+pkgname=pythonqt
+pkgver=3.2
+pkgrel=3
+pkgdesc='A dynamic Python binding for Qt applications'
+arch=('i686' 'x86_64')
+url='http://pythonqt.sourceforge.net/'
+license=('LGPL2.1')
+
+depends=('python' 'qt5-multimedia' 'qt5-svg' 'qt5-webkit' 'qt5-declarative')
+makedepends=('git' 'qt5-tools')
+conflicts=('qt5-python27-git')
+replaces=("${pkgname}-qt5")
+
+source=(
+ "http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/PythonQt-${pkgver}/PythonQt${pkgver}.zip"
+ 'fix_python_version.patch'
+ 'pkgconfig_file.prf'
+ 'create_pkgconfig_file.patch'
+)
+sha512sums=(
+ '1ee0f50f5035568b38e945108f5496ba64355c6357c1ea8dfc17ad90fa360540769f94e0b3e0e398176e8a21c8afe139607f0b5a2e82c63f1cbd40201a25e0f0'
+ '9747898842f60bdfc5c38a54f7516a46b46279c57cbfa6c7f4796aa1ca5771ebb121f07fe4d09d23c60c92530750ee265808484f3e07aaae72065ed51c3896c7'
+ 'a146b46d4fb7162dc4290c662971742a4f85e11b2f5f9d71b4cd52f500ed7f0c3c1cf9034ead2e91f3c4e133446838fa530b3e13d3618617c695f2a433fdbb23'
+ '9386ec26b3a59de492a9d8c31ca6c4f9e220510070a6d5c0a063618e3f6e7c4db611b27f6b46c028b5613e70453db67c060533e6940d72ff9ea623d80c2f99f9'
+)
+
+prepare() {
+ # Create build directory
+ mkdir -p "${srcdir}"/build
+ cd "${srcdir}"/build
+ cp -R ../PythonQt${pkgver}/* ./
+
+ # Fix python version
+ patch -Np1 < ../fix_python_version.patch
+
+ # Add qmake configuration file to generate
+ # PythonQt pkg-config file (*.pc)
+ cp ../pkgconfig_file.prf build/
+ patch -Np1 < ../create_pkgconfig_file.patch
+}
+
+build() {
+ # Building package
+ cd "${srcdir}"/build
+ qmake-qt5 \
+ QMAKE_CFLAGS="${CFLAGS}" \
+ QMAKE_CXXFLAGS="${CXXFLAGS}" \
+ CONFIG+=release \
+ CONFIG+=c++14
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+
+ # Includes
+ mkdir -p "${pkgdir}"/usr/include/PythonQt/{gui,extensions/PythonQt_QtAll}
+ cp ../PythonQt${pkgver}/src/*.h "${pkgdir}"/usr/include/PythonQt/
+ cp ../PythonQt${pkgver}/src/gui/*.h "${pkgdir}"/usr/include/PythonQt/gui/
+ cp ../PythonQt${pkgver}/extensions/PythonQt_QtAll/*.h "${pkgdir}"/usr/include/PythonQt/extensions/PythonQt_QtAll/
+
+ # Library
+ mkdir -p "${pkgdir}"/usr/lib
+ cp -a lib/*.so* "${pkgdir}"/usr/lib/
+
+ # pkg-config file
+ mkdir -p "${pkgdir}"/usr/share/
+ cp -R pkgconfig "${pkgdir}"/usr/share/
+}
diff --git a/pcr/pythonqt/create_pkgconfig_file.patch b/pcr/pythonqt/create_pkgconfig_file.patch
new file mode 100644
index 000000000..a6d51ab86
--- /dev/null
+++ b/pcr/pythonqt/create_pkgconfig_file.patch
@@ -0,0 +1,9 @@
+diff -uprNEBZ --suppress-blank-empty b/src/src.pro c/src/src.pro
+--- b/src/src.pro 2017-06-06 02:26:06.000000000 -0500
++++ c/src/src.pro 2017-06-13 13:00:29.533614419 -0500
+@@ -41,3 +41,5 @@ include ( src.pri )
+
+ include($${PYTHONQT_GENERATED_PATH}/com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin.pri)
+ include($${PYTHONQT_GENERATED_PATH}/com_trolltech_qt_gui_builtin/com_trolltech_qt_gui_builtin.pri)
++
++include(../build/pkgconfig_file.prf)
diff --git a/pcr/pythonqt/fix_python_version.patch b/pcr/pythonqt/fix_python_version.patch
new file mode 100644
index 000000000..898c96013
--- /dev/null
+++ b/pcr/pythonqt/fix_python_version.patch
@@ -0,0 +1,13 @@
+diff -uprNEBZ --suppress-blank-empty a/build/python.prf b/build/python.prf
+--- a/build/python.prf 2016-06-09 06:10:52.000000000 -0500
++++ b/build/python.prf 2017-06-08 10:03:40.858019605 -0500
+@@ -2,7 +2,8 @@
+
+ # Change this variable to your python version (2.6, 2.7, 3.3, ...)
+ win32:PYTHON_VERSION=27
+-unix:PYTHON_VERSION=2.7
++# Use Python3
++unix:PYTHON_VERSION=3
+
+ macx {
+ # for macx you need to have the Python development kit installed as framework
diff --git a/pcr/pythonqt/pkgconfig_file.prf b/pcr/pythonqt/pkgconfig_file.prf
new file mode 100644
index 000000000..b8bd6f79f
--- /dev/null
+++ b/pcr/pythonqt/pkgconfig_file.prf
@@ -0,0 +1,12 @@
+# Generate pkg-config file (*.pc)
+CONFIG += create_pc create_prl no_install_prl
+
+# pkg-config file metadata
+QMAKE_PKGCONFIG_NAME = PythonQt
+QMAKE_PKGCONFIG_FILE = $${QMAKE_PKGCONFIG_NAME}
+QMAKE_PKGCONFIG_VERSION = $${VERSION}
+QMAKE_PKGCONFIG_DESCRIPTION = A dynamic Python binding for Qt applications
+QMAKE_PKGCONFIG_PREFIX = $$[QT_HOST_PREFIX]
+QMAKE_PKGCONFIG_LIBDIR = $$[QT_HOST_LIBS]
+QMAKE_PKGCONFIG_INCDIR = $${QMAKE_PKGCONFIG_PREFIX}/include/$${QMAKE_PKGCONFIG_NAME}
+QMAKE_PKGCONFIG_DESTDIR = ../pkgconfig