Import arandr, a Python xrandr GUI.

OK sthen@
This commit is contained in:
edd 2013-11-18 21:51:11 +00:00
parent 4382dfde6d
commit 2ab4e131fc
5 changed files with 147 additions and 0 deletions

23
x11/arandr/Makefile Normal file
View File

@ -0,0 +1,23 @@
# $OpenBSD: Makefile,v 1.1.1.1 2013/11/18 21:51:11 edd Exp $
COMMENT = xrandr gui
MODPY_EGG_VERSION = 0.1.7.1
DISTNAME = arandr-${MODPY_EGG_VERSION}
CATEGORIES = x11 sysutils
HOMEPAGE = http://christian.amsuess.com/tools/arandr/
MAINTAINER = Edd Barrett <edd@openbsd.org>
# GPLv3
PERMIT_PACKAGE_CDROM = Yes
MASTER_SITES = http://christian.amsuess.com/tools/arandr/files/
MODULES = lang/python
RUN_DEPENDS = x11/py-gtk2 \
devel/desktop-file-utils
BUILD_DEPENDS = textproc/py-docutils
NO_TEST = Yes
.include <bsd.port.mk>

2
x11/arandr/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (arandr-0.1.7.1.tar.gz) = q3OqkNBdSLlaAa/a03t8IaLN9K+Y99eLJQK4GTgnSNo=
SIZE (arandr-0.1.7.1.tar.gz) = 82118

View File

@ -0,0 +1,60 @@
$OpenBSD: patch-setup_py,v 1.1.1.1 2013/11/18 21:51:11 edd Exp $
Do not compress manual pages and install them in the right place.
--- setup.py.orig Mon Mar 4 17:22:25 2013
+++ setup.py Mon Nov 18 20:56:56 2013
@@ -20,7 +20,6 @@ import os
import operator
import subprocess
import glob
-import gzip
import docutils.core
import docutils.writers.manpage
@@ -99,20 +98,19 @@ class build_man(NoOptionCommand):
def run(self):
self.mkpath('build')
- for (sourcefile, gzfile) in [
- ('data/arandr.1.txt', os.path.join('build', 'arandr.1.gz')),
- ('data/unxrandr.1.txt', os.path.join('build', 'unxrandr.1.gz')),
+ for (sourcefile, manfile) in [
+ ('data/arandr.1.txt', os.path.join('build', 'arandr.1')),
+ ('data/unxrandr.1.txt', os.path.join('build', 'unxrandr.1')),
]:
- if newer(sourcefile, gzfile):
+ if newer(sourcefile, manfile):
rst_source = open(sourcefile).read()
manpage = docutils.core.publish_string(rst_source, writer=docutils.writers.manpage.Writer())
- info('compressing man page to %s', gzfile)
+ info('writing man page to %s', manfile)
if not self.dry_run:
- compressed = gzip.open(gzfile, 'w', 9)
- compressed.write(manpage)
- compressed.close()
+ with open(manfile, 'w') as fh:
+ fh.write(manpage)
class build(_build):
sub_commands = _build.sub_commands + [('build_trans', None), ('build_man', None)]
@@ -137,7 +135,7 @@ class clean(_clean):
def run(self):
if self.all:
dirs = ['build/locale']
- files = ['build/arandr.1.gz', 'build/unxrandr.1.gz']
+ files = ['build/arandr.1', 'build/unxrandr.1']
for directory in dirs:
if os.path.exists(directory):
remove_tree(directory, dry_run=self.dry_run)
@@ -177,7 +175,7 @@ setup(name = PACKAGENAME,
},
data_files = [
('share/applications', ['data/arandr.desktop']), # FIXME: use desktop-file-install?
- ('share/man/man1', ['build/arandr.1.gz', 'build/unxrandr.1.gz']),
+ ('man/man1', ['build/arandr.1', 'build/unxrandr.1']),
],
scripts = ['arandr', 'unxrandr'],
)

3
x11/arandr/pkg/DESCR Normal file
View File

@ -0,0 +1,3 @@
RandR is designed to provide a simple visual front end for XRandR.
Relative monitor positions are shown graphically and can be changed in a
drag-and-drop way.

59
x11/arandr/pkg/PLIST Normal file
View File

@ -0,0 +1,59 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2013/11/18 21:51:11 edd Exp $
bin/arandr
bin/unxrandr
lib/python${MODPY_VERSION}/site-packages/arandr-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
lib/python${MODPY_VERSION}/site-packages/screenlayout/
lib/python${MODPY_VERSION}/site-packages/screenlayout/__init__.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/screenlayout/auxiliary.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/auxiliary.pyc
lib/python${MODPY_VERSION}/site-packages/screenlayout/data/
lib/python${MODPY_VERSION}/site-packages/screenlayout/data/gpl-3.txt
lib/python${MODPY_VERSION}/site-packages/screenlayout/demo.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/demo.pyc
lib/python${MODPY_VERSION}/site-packages/screenlayout/gui.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/gui.pyc
lib/python${MODPY_VERSION}/site-packages/screenlayout/meta.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/meta.pyc
lib/python${MODPY_VERSION}/site-packages/screenlayout/metacity.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/metacity.pyc
lib/python${MODPY_VERSION}/site-packages/screenlayout/snap.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/snap.pyc
lib/python${MODPY_VERSION}/site-packages/screenlayout/widget.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/widget.pyc
lib/python${MODPY_VERSION}/site-packages/screenlayout/xrandr.py
lib/python${MODPY_VERSION}/site-packages/screenlayout/xrandr.pyc
@man man/man1/arandr.1
@man man/man1/unxrandr.1
share/applications/arandr.desktop
share/locale/ar/LC_MESSAGES/arandr.mo
share/locale/br/LC_MESSAGES/arandr.mo
share/locale/bs/LC_MESSAGES/arandr.mo
share/locale/ca/LC_MESSAGES/arandr.mo
share/locale/da/LC_MESSAGES/arandr.mo
share/locale/de/LC_MESSAGES/arandr.mo
share/locale/el/LC_MESSAGES/arandr.mo
share/locale/es/LC_MESSAGES/arandr.mo
share/locale/fa/LC_MESSAGES/arandr.mo
share/locale/fr/LC_MESSAGES/arandr.mo
share/locale/gl/LC_MESSAGES/arandr.mo
share/locale/hu/LC_MESSAGES/arandr.mo
share/locale/it/LC_MESSAGES/arandr.mo
share/locale/ja/LC_MESSAGES/arandr.mo
share/locale/kn/LC_MESSAGES/arandr.mo
share/locale/ko_KR/
share/locale/ko_KR/LC_MESSAGES/
share/locale/ko_KR/LC_MESSAGES/arandr.mo
share/locale/lt/LC_MESSAGES/arandr.mo
share/locale/nl/LC_MESSAGES/arandr.mo
share/locale/pl/LC_MESSAGES/arandr.mo
share/locale/pt_BR/LC_MESSAGES/arandr.mo
share/locale/ro/LC_MESSAGES/arandr.mo
share/locale/ru/LC_MESSAGES/arandr.mo
share/locale/sk/LC_MESSAGES/arandr.mo
share/locale/sv/LC_MESSAGES/arandr.mo
share/locale/tr/LC_MESSAGES/arandr.mo
share/locale/uk/LC_MESSAGES/arandr.mo
share/locale/zh_CN/LC_MESSAGES/arandr.mo
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database