This repository has been archived by the owner on Apr 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added initial non-working Arch pkgbuild stuff
- Loading branch information
1 parent
633368d
commit cfc953d
Showing
5 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
pkgname='pywinery' | ||
pkgver='0.3-3' | ||
pkgrel=1 | ||
pkgdesc='Wine prefix launcher and manager' | ||
arch='any' | ||
url='http://pywinery.googlecode.com' | ||
depends=('python-gobject>=3.4' 'python' 'xdg-utils' 'icoutils') | ||
optdepends=( | ||
'wine: system-wide wine executable' / | ||
'winetricks: useful installer scripts' | ||
) | ||
makedepends=('python-setuptools') | ||
license='GPLv3' | ||
|
||
install='arch/pywinery.install' | ||
source=("pywinery::svn+https://pywinery.googlecode.com/svn/branches/0.3/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Updates defaults.list file if present. | ||
update_defaults_list() { | ||
# $1: name of the .desktop file | ||
|
||
local DEFAULTS_FILE="/usr/share/applications/defaults.list" | ||
|
||
if [ ! -f "${DEFAULTS_FILE}" ]; then | ||
return | ||
fi | ||
|
||
# Split key-value pair out of MimeType= line from the .desktop file, | ||
# then split semicolon-separated list of mime types (they should not contain | ||
# spaces). | ||
mime_types="$(grep MimeType= /usr/share/applications/${1} | | ||
cut -d '=' -f 2- | | ||
tr ';' ' ')" | ||
for mime_type in ${mime_types}; do | ||
if egrep -q "^${mime_type}=" "${DEFAULTS_FILE}"; then | ||
if ! egrep -q "^${mime_type}=.*${1}" "${DEFAULTS_FILE}"; then | ||
default_apps="$(grep ${mime_type}= "${DEFAULTS_FILE}" | | ||
cut -d '=' -f 2-)" | ||
egrep -v "^${mime_type}=" "${DEFAULTS_FILE}" > "${DEFAULTS_FILE}.new" | ||
echo "${mime_type}=${default_apps};${1}" >> "${DEFAULTS_FILE}.new" | ||
mv "${DEFAULTS_FILE}.new" "${DEFAULTS_FILE}" | ||
fi | ||
else | ||
# If there's no mention of the mime type in the file, add it. | ||
echo "${mime_type}=${1};" >> "${DEFAULTS_FILE}" | ||
fi | ||
done | ||
} | ||
|
||
HICOLOR_DIR="/usr/share/icons/hicolor" # reasonable default | ||
if [ -n "$XDG_DATA_DIRS" ]; then | ||
xdg_system_dirs="$XDG_DATA_DIRS" | ||
else | ||
xdg_system_dirs="/usr/local/share/:/usr/share/" | ||
fi | ||
|
||
for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do | ||
if [ -w $x/icons/hicolor ]; then | ||
HICOLOR_DIR="$x/icons/hicolor" | ||
break | ||
fi | ||
done | ||
|
||
add_icon() { | ||
mkdir -p "$HICOLOR_DIR/$1/apps" | ||
cp $2 "$HICOLOR_DIR/$1/apps/`basename $2`" | ||
} | ||
|
||
# This is a default template for a post-install scriptlet. | ||
# Uncomment only required functions and remove any functions | ||
# you don't need (and this header). | ||
|
||
## arg 1: the new package version | ||
#pre_install() { | ||
# do something here | ||
#} | ||
|
||
## arg 1: the new package version | ||
post_install() { | ||
update_defaults_list 'pywinery.desktop' | ||
add_icon scalable '/usr/share/pywinery/pywinery.svg' | ||
xdg-icon-resource forceupdate | ||
} | ||
|
||
## arg 1: the new package version | ||
## arg 2: the old package version | ||
#pre_upgrade() { | ||
# do something here | ||
#} | ||
|
||
## arg 1: the new package version | ||
## arg 2: the old package version | ||
#post_upgrade() { | ||
# do something here | ||
#} | ||
|
||
## arg 1: the old package version | ||
#pre_remove() { | ||
# do something here | ||
#} | ||
|
||
## arg 1: the old package version | ||
#post_remove() { | ||
# do something here | ||
#} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
pywinery (0.3-3) testing; urgency=medium | ||
* Python 3.4 compatibility. | ||
|
||
-- Felipe A. Hernandez <[email protected]> Sun, 20 Jul 2014 19:00:00 +0100 | ||
|
||
pywinery (0.3-2) testing; urgency=medium | ||
* Prefix duplication implemented. | ||
* Some dependency fixes (fixes issue#13). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
''' | ||
# TODO(spayder26): locales | ||
__app__ = "pywinery" | ||
__version__ = (0, 3, 1) | ||
__version__ = '0.3.3' | ||
__author__ = "Felipe A. Hernandez <[email protected]>" | ||
|
||
from os import environ, listdir, sep, linesep, kill as os_kill, getuid,\ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#!/usr/bin/env python | ||
|
||
from distutils.core import setup | ||
from pywinery import __version__ | ||
|
||
setup(name = 'pywinery', | ||
version = '0.3.2', | ||
version = __version__, | ||
author = 'Felipe A. Hernandez', | ||
author_email = '<[email protected]>', | ||
url = 'http://pywinery.googlecode.com', | ||
|