summaryrefslogtreecommitdiff
path: root/libre/octopi
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-07-09 12:51:45 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-07-09 12:51:45 -0300
commitca8154faa5191e6f1264fc2d46e5eb512535c51a (patch)
tree967816e55fffa2518981cd858427f5a3283f5473 /libre/octopi
parentc6478dc413b65e5ca059fa8e756514153fdc335c (diff)
downloadabslibre-ca8154faa5191e6f1264fc2d46e5eb512535c51a.tar.gz
abslibre-ca8154faa5191e6f1264fc2d46e5eb512535c51a.tar.bz2
abslibre-ca8154faa5191e6f1264fc2d46e5eb512535c51a.zip
octopi: add new package to [libre]
Diffstat (limited to 'libre/octopi')
-rw-r--r--libre/octopi/PKGBUILD121
-rw-r--r--libre/octopi/octopi-repoeditor.desktop9
-rw-r--r--libre/octopi/octopi.install12
-rw-r--r--libre/octopi/parabola-support.patch154
4 files changed, 296 insertions, 0 deletions
diff --git a/libre/octopi/PKGBUILD b/libre/octopi/PKGBUILD
new file mode 100644
index 000000000..14b2a4f86
--- /dev/null
+++ b/libre/octopi/PKGBUILD
@@ -0,0 +1,121 @@
+# Maintainer (Arch): Jameson Pugh <imntreal@gmail.com>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+pkgbase=octopi
+pkgname=('octopi' 'octopi-notifier' 'octopi-repoeditor' 'octopi-cachecleaner')
+pkgver=0.7.0
+pkgrel=3.parabola1
+arch=('i686' 'x86_64')
+url="https://github.com/aarnt/octopi"
+license=('GPL2')
+makedepends=('qt5-declarative' 'qt4' 'knotifications' 'libnotify')
+source=("https://github.com/aarnt/${pkgname}/archive/v${pkgver}.tar.gz"
+ 'octopi-repoeditor.desktop'
+ 'parabola-support.patch')
+sha256sums=('03d15458ebe482e5a9a00e7a3db5676a53886c754b13a7c56e36d75b73f2d496'
+ '131f16745df685430db55e54ede6da66aed9b02ca00d6d873a002b2a3e1c90ef'
+ '48bd938f2286e9eca5ae8b204fea5c628a53906c4b8aa9ca304a3e25dcc99822')
+prepare() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ patch -Np1 -i ../parabola-support.patch
+}
+
+build() {
+ _cpucount=$(grep -c processor /proc/cpuinfo 2>/dev/null)
+ _jc=$((${_cpucount:-1}))
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ qmake-qt5 octopi.pro
+ make -j $_jc
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/notifier/pacmanhelper"
+ msg "Building pacmanhelper..."
+ qmake-qt5 pacmanhelper.pro
+ make -j $_jc
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/notifier/octopi-notifier"
+ msg "Building octopi-notifier..."
+ qmake-qt5 octopi-notifier.pro
+ make -j $_jc
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/repoeditor"
+ msg "Building octopi-repoeditor..."
+ qmake-qt5 octopi-repoeditor.pro
+ make -j $_jc
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/cachecleaner"
+ msg "Building octopi-cachecleaner..."
+ qmake-qt5 octopi-cachecleaner.pro
+ make -j $_jc
+}
+
+package_octopi() {
+ pkgdesc="A powerful Pacman frontend using Qt5 libs, with Parabola support"
+ install="octopi.install"
+ depends=('qt5-base' 'qt5-declarative' 'xterm')
+ optdepends=('kdesu: for KDE'
+ 'gksu: for XFCE, Gnome, LXDE, Cinnamon'
+ 'gnome-keyring: for password management'
+ 'gist: for SysInfo report'
+ 'octopi-repoeditor: for editing functions'
+ 'octopi-cachecleaner: for cleaning functions'
+ 'octopi-notifier: for notifications'
+ 'pacmanlogviewer: to view pacman log files')
+ conflicts=('oktopi-git')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ install -D -m755 "${srcdir}/${pkgbase}-${pkgver}/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/resources/images/${pkgname}_green.png" "${pkgdir}/usr/share/icons/${pkgname}.png"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/resources/images/${pkgname}_green.png" "${pkgdir}/usr/share/icons/gnome/32x32/apps/${pkgname}.png"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/resources/images/${pkgname}_red.png" "${pkgdir}/usr/share/icons/${pkgname}_red.png"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/resources/images/${pkgname}_yellow.png" "${pkgdir}/usr/share/icons/${pkgname}_yellow.png"
+
+ #Pacmanhelper service files
+ install -D -m755 "${srcdir}/${pkgbase}-${pkgver}/notifier/bin/pacmanhelper" "${pkgdir}/usr/lib/octopi/pacmanhelper"
+
+ #speedup files
+ install -D -m755 "${srcdir}/${pkgbase}-${pkgver}/speedup/speedup-octopi.sh" "${pkgdir}/usr/bin/speedup-octopi.sh"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/speedup/${pkgname}.service" "${pkgdir}/etc/systemd/system/${pkgname}.service"
+
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/notifier/pacmanhelper/polkit/org.octopi.pacman.policy" "${pkgdir}/usr/share/polkit-1/actions/org.octopi.pacman.policy"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf" "${pkgdir}/etc/dbus-1/system.d/org.octopi.pacmanhelper.conf"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml" "${pkgdir}/usr/share/dbus-1/interfaces/org.octopi.pacmanhelper.xml"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service" "${pkgdir}/usr/share/dbus-1/system-services/org.octopi.pacmanhelper.service"
+}
+
+package_octopi-notifier() {
+ pkgdesc="Notifier for Octopi"
+ depends=('octopi' 'libnotify')
+ optdepends=('xfce4-notifyd: for notifications in XFCE')
+ install=octopi.install
+ conflicts='octopi-notifier-qt4'
+ replaces='octopi-notifier-qt4'
+
+ #Octopi-notifier file
+ install -D -m755 "${srcdir}/${pkgbase}-${pkgver}/notifier/bin/octopi-notifier" "${pkgdir}/usr/bin/octopi-notifier"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/octopi-notifier.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/octopi-notifier.desktop" "${pkgdir}/etc/xdg/autostart/octopi-notifier.desktop"
+}
+
+package_octopi-repoeditor() {
+ pkgdesc="Pacman repo editor for Octopi"
+ install=octopi.install
+
+ install -D -m755 "${srcdir}/${pkgbase}-${pkgver}/repoeditor/bin/octopi-repoeditor" "${pkgdir}/usr/bin/octopi-repoeditor"
+ install -D -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -D -m644 "${srcdir}/${pkgbase}-${pkgver}/resources/images/${pkgbase}_red.png" "${pkgdir}/usr/share/icons/${pkgname}.png"
+}
+
+package_octopi-cachecleaner() {
+ pkgdesc="Cachecleaner for Octopi"
+
+ #Octopi-cachecleaner file
+ install -D -m755 ${srcdir}/${pkgbase}-${pkgver}/cachecleaner/bin/octopi-cachecleaner ${pkgdir}/usr/bin/octopi-cachecleaner
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/cachecleaner/$pkgname.desktop ${pkgdir}/usr/share/applications/$pkgname.desktop
+}
+
+# vim: set ts=2 sw=2 ft=sh noet:
diff --git a/libre/octopi/octopi-repoeditor.desktop b/libre/octopi/octopi-repoeditor.desktop
new file mode 100644
index 000000000..6e52a0076
--- /dev/null
+++ b/libre/octopi/octopi-repoeditor.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Octopi Repo Editor
+Icon=octopi-repoeditor
+Exec=octopi-repoeditor
+Terminal=false
+Type=Application
+Categories=GNOME;GTK;System;
+#NotShowIn=GNOME;XFCE;LXDE;KDE;
+StartupNotify=true
diff --git a/libre/octopi/octopi.install b/libre/octopi/octopi.install
new file mode 100644
index 000000000..8ec315e7c
--- /dev/null
+++ b/libre/octopi/octopi.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/libre/octopi/parabola-support.patch b/libre/octopi/parabola-support.patch
new file mode 100644
index 000000000..1e0d88291
--- /dev/null
+++ b/libre/octopi/parabola-support.patch
@@ -0,0 +1,154 @@
+diff -Nur octopi-0.7.0.orig/src/mainwindow_news.cpp octopi-0.7.0/src/mainwindow_news.cpp
+--- octopi-0.7.0.orig/src/mainwindow_news.cpp 2015-04-27 20:05:43.000000000 -0300
++++ octopi-0.7.0/src/mainwindow_news.cpp 2015-07-09 10:53:40.713803510 -0300
+@@ -92,6 +92,11 @@
+ writeToTabOutputExt("<b>" +
+ StrConstants::getSearchingForDistroNews().arg("Netrunner Rolling") + "</b>");
+ }
++ else if (gotoNewsTab && distro == ectn_PARABOLA)
++ {
++ writeToTabOutputExt("<b>" +
++ StrConstants::getSearchingForDistroNews().arg("Parabola GNU/Linux-libre") + "</b>");
++ }
+
+ /*
+ * Here, we retrieve distro's latest news without
+diff -Nur octopi-0.7.0.orig/src/package.cpp octopi-0.7.0/src/package.cpp
+--- octopi-0.7.0.orig/src/package.cpp 2015-04-27 20:05:43.000000000 -0300
++++ octopi-0.7.0/src/package.cpp 2015-07-09 10:53:40.713803510 -0300
+@@ -1154,7 +1154,8 @@
+ else if (UnixCommand::getLinuxDistro() == ectn_ARCHBANGLINUX ||
+ UnixCommand::getLinuxDistro() == ectn_ARCHLINUX ||
+ UnixCommand::getLinuxDistro() == ectn_KAOS ||
+- UnixCommand::getLinuxDistro() == ectn_MOOOSLINUX)
++ UnixCommand::getLinuxDistro() == ectn_MOOOSLINUX ||
++ UnixCommand::getLinuxDistro() == ectn_PARABOLA)
+ {
+ result = UnixCommand::getPackageContentsUsingPkgfile(pkgName);
+ }
+diff -Nur octopi-0.7.0.orig/src/strconstants.h octopi-0.7.0/src/strconstants.h
+--- octopi-0.7.0.orig/src/strconstants.h 2015-04-27 20:05:43.000000000 -0300
++++ octopi-0.7.0/src/strconstants.h 2015-07-09 11:10:32.856845110 -0300
+@@ -60,6 +60,9 @@
+ if (UnixCommand::getLinuxDistro() == ectn_KAOS)
+ return QLatin1String( "KCP" );
+
++ if (UnixCommand::getLinuxDistro() == ectn_PARABOLA)
++ return QLatin1String( "Custom" );
++
+ return QLatin1String( "AUR" );
+ }
+
+@@ -68,6 +71,8 @@
+ return QLatin1String( "ccr" );
+ else if (UnixCommand::getLinuxDistro() == ectn_KAOS)
+ return QLatin1String( "kcp" );
++ else if (UnixCommand::getLinuxDistro() == ectn_PARABOLA)
++ return QLatin1String( "custom" );
+
+ return QLatin1String( "aur" );
+ }
+@@ -85,6 +90,8 @@
+ ret = QLatin1String( "kcp" );
+ else if (UnixCommand::hasTheExecutable("pacaur"))
+ ret = QLatin1String( "pacaur" );
++ else if (UnixCommand::getLinuxDistro() == ectn_PARABOLA)
++ ret = QLatin1String( "custom" );
+ else
+ ret = QLatin1String( "yaourt" );
+
+@@ -100,6 +107,8 @@
+ return QLatin1String( "Ccr" );
+ else if (UnixCommand::getLinuxDistro() == ectn_KAOS)
+ return QLatin1String( "KCP" );
++ else if (UnixCommand::getLinuxDistro() == ectn_PARABOLA)
++ return QLatin1String( "Custom" );
+
+ return QLatin1String( "AUR" );
+ }
+@@ -110,6 +119,8 @@
+ return QLatin1String( "ccr/" );
+ else if (UnixCommand::getLinuxDistro() == ectn_KAOS)
+ return "kcp/";
++ else if (UnixCommand::getLinuxDistro() == ectn_PARABOLA)
++ return "custom/";
+
+ return QLatin1String( "aur/" );
+ }
+@@ -142,12 +153,16 @@
+ return QObject::tr("Netrunner Rolling news");
+ }
+
++ static QString getParabolaNews(){
++ return QObject::tr("Parabola GNU/Linux-libre news");
++ }
++
+ static QString getNewsErrorMessage(){
+ return QObject::tr("No news could be found! Press Ctrl+G to download the latest news.");
+ }
+
+ static QString getIncompatibleLinuxDistroError(){
+- return QObject::tr("This Linux distro seems to be incompatible with Octopi!");
++ return QObject::tr("This GNU/Linux distro seems to be incompatible with Octopi!");
+ }
+
+ static QString getInternetUnavailableError(){
+diff -Nur octopi-0.7.0.orig/src/unixcommand.cpp octopi-0.7.0/src/unixcommand.cpp
+--- octopi-0.7.0.orig/src/unixcommand.cpp 2015-04-27 20:05:43.000000000 -0300
++++ octopi-0.7.0/src/unixcommand.cpp 2015-07-09 10:53:40.717136678 -0300
+@@ -1036,6 +1036,10 @@
+ {
+ ret = ectn_NETRUNNER;
+ }
++ else if (contents.contains(QRegExp("Parabola GNU/Linux-libre")))
++ {
++ ret = ectn_PARABOLA;
++ }
+ else
+ {
+ ret = ectn_UNKNOWN;
+diff -Nur octopi-0.7.0.orig/src/unixcommand.h octopi-0.7.0/src/unixcommand.h
+--- octopi-0.7.0.orig/src/unixcommand.h 2015-04-27 20:05:43.000000000 -0300
++++ octopi-0.7.0/src/unixcommand.h 2015-07-09 10:53:40.717136678 -0300
+@@ -37,7 +37,7 @@
+ ectn_RUN_IN_TERMINAL };
+
+ enum LinuxDistro { ectn_ANTERGOS, ectn_ARCHBANGLINUX, ectn_ARCHBSD, ectn_ARCHLINUX, ectn_CHAKRA,
+- ectn_KAOS, ectn_MANJAROLINUX, ectn_MOOOSLINUX, ectn_NETRUNNER, ectn_UNKNOWN };
++ ectn_KAOS, ectn_MANJAROLINUX, ectn_MOOOSLINUX, ectn_NETRUNNER, ectn_PARABOLA, ectn_UNKNOWN };
+
+ enum Language { ectn_LANG_ENGLISH, ectn_LANG_USER_DEFINED };
+
+diff -Nur octopi-0.7.0.orig/src/utils.cpp octopi-0.7.0/src/utils.cpp
+--- octopi-0.7.0.orig/src/utils.cpp 2015-04-27 20:05:43.000000000 -0300
++++ octopi-0.7.0/src/utils.cpp 2015-07-09 11:21:49.993222650 -0300
+@@ -278,6 +278,7 @@
+ //const QString ctn_MANJARO_LINUX_RSS_URL = "http://manjaro.org/feed/";
+ const QString ctn_MANJARO_LINUX_RSS_URL = "https://manjaro.github.io/feed.xml";
+ const QString ctn_NETRUNNER_RSS_URL = "http://www.netrunner-os.com/feed/";
++ const QString ctn_PARABOLA_RSS_URL = "https://www.parabola.nu/feeds/news/";
+
+ LinuxDistro distro = UnixCommand::getLinuxDistro();
+ QString res;
+@@ -326,6 +327,10 @@
+ {
+ curlCommand = curlCommand.arg(ctn_NETRUNNER_RSS_URL).arg(tmpRssPath);
+ }
++ else if (distro == ectn_PARABOLA)
++ {
++ curlCommand = curlCommand.arg(ctn_PARABOLA_RSS_URL).arg(tmpRssPath);
++ }
+
+ if (UnixCommand::runCurlCommand(curlCommand).isEmpty())
+ {
+@@ -438,6 +443,10 @@
+ {
+ html = "<p align=\"center\"><h2>" + StrConstants::getNetrunnerNews() + "</h2></p><ul>";
+ }
++ else if (distro == ectn_PARABOLA)
++ {
++ html = "<p align=\"center\"><h2>" + StrConstants::getParabolaNews() + "</h2></p><ul>";
++ }
+
+ QString rssPath = QDir::homePath() + QDir::separator() + ".config/octopi/distro_rss.xml";
+ QDomDocument doc("rss");