diff options
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | fixes.patch | 24 | ||||
-rw-r--r-- | pillow.patch | 69 |
4 files changed, 104 insertions, 58 deletions
@@ -1,23 +1,23 @@ # Generated by mksrcinfo v8 -# Sat May 7 15:22:53 UTC 2016 +# Thu Feb 2 19:57:47 UTC 2017 pkgbase = nemo-media-columns - pkgdesc = Nemo extension to display music/EXIF and PDF metadata info - pkgver = 3.0.0 + pkgdesc = Media properties columns in Nemo + pkgver = 3.2.1 pkgrel = 1 - url = http://packages.linuxmint.com/pool/main/n/nemo-media-columns/ + url = https://github.com/linuxmint/nemo-extensions arch = any - license = GPL - depends = nemo>=3.0 - depends = nemo<3.1 - depends = mutagen + license = GPL2 depends = nemo-python + depends = mutagen depends = python2-exiv2 - depends = python2-pillow + depends = kaa-metadata depends = python2-pypdf - source = http://packages.linuxmint.com/pool/main/n/nemo-media-columns/nemo-media-columns_3.0.0+betsy.tar.xz - source = fixes.patch - md5sums = 316e8d7b14fade3e227c5a693f3837b2 - md5sums = 967e13e185e0a082ce5dd258cd0d9916 + depends = python2-pillow + options = !emptydirs + source = nemo-media-columns-3.2.1.tar.xz::http://packages.linuxmint.com/pool/main/n/nemo-media-columns/nemo-media-columns_3.2.1+betsy.tar.xz + source = pillow.patch + sha256sums = 06ec025d5e0a255937115ac280559d3b85f4ea6db8ec08b8c46a7c081bc06323 + sha256sums = 52e9f55e4f05671607a458f33021e8d04f04e58149965e4ca3165288ac724e94 pkgname = nemo-media-columns @@ -1,32 +1,33 @@ -# Maintainer: Sebastian Lau <lauseb644 _at_ gmail _dot_ com> -# Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to> +# Maintainer: twa022 <twa022 at gmail dot com> -pkgname=nemo-media-columns -_mintrel=betsy -pkgver=3.0.0 +pkgname='nemo-media-columns' +pkgver=3.2.1 +_mintrel='betsy' pkgrel=1 -pkgdesc="Nemo extension to display music/EXIF and PDF metadata info" -arch=(any) -url="http://packages.linuxmint.com/pool/main/n/nemo-media-columns/" -license=(GPL) -depends=('nemo>=3.0' 'nemo<3.1' 'mutagen' 'nemo-python' 'python2-exiv2' 'python2-pillow' 'python2-pypdf') -source=("http://packages.linuxmint.com/pool/main/n/${pkgname}/${pkgname}_${pkgver}+${_mintrel}.tar.xz" - fixes.patch) -md5sums=('316e8d7b14fade3e227c5a693f3837b2' - '967e13e185e0a082ce5dd258cd0d9916') +pkgdesc="Media properties columns in Nemo" +arch=('any') +license=('GPL2') +url="https://github.com/linuxmint/nemo-extensions" +depends=('nemo-python' 'mutagen' 'python2-exiv2' 'kaa-metadata' 'python2-pypdf' 'python2-pillow') +options=('!emptydirs') +source=("${pkgname}-${pkgver}.tar.xz::http://packages.linuxmint.com/pool/main/${pkgname:0:1}/${pkgname}/${pkgname}_${pkgver}+${_mintrel}.tar.xz" + 'pillow.patch') + +sha256sums=('06ec025d5e0a255937115ac280559d3b85f4ea6db8ec08b8c46a7c081bc06323' + '52e9f55e4f05671607a458f33021e8d04f04e58149965e4ca3165288ac724e94') prepare() { - cd "${pkgname}-${pkgver}+${_mintrel}" + cd ${pkgname}-${pkgver}+${_mintrel} # Python2 fix -# find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@' - sed -i "s|^\(#!.*python\)$|\12|" nemo-media-columns.py - patch -p1 -i ../fixes.patch + find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@' + + # Use pillow library for Image + patch -uNp2 -r- -i ../pillow.patch } package() { - cd "${pkgname}-${pkgver}+${_mintrel}" + cd ${pkgname}-${pkgver}+${_mintrel} - install -dm755 "${pkgdir}/usr/share/nemo-python/extensions/" - install -m644 nemo-media-columns.py "${pkgdir}/usr/share/nemo-python/extensions/" + install -Dm644 nemo-media-columns.py ${pkgdir}/usr/share/nemo-python/extensions/nemo-media-columns.py } diff --git a/fixes.patch b/fixes.patch deleted file mode 100644 index 5424f5cc0417..000000000000 --- a/fixes.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/nemo-media-columns.py -+++ b/nemo-media-columns.py -@@ -31,9 +31,10 @@ - # for exif support - import pyexiv2 - # for reading videos. for future improvement, this can also read mp3! --import kaa.metadata -+#import kaa.metadata - # for reading image dimensions --import Image -+#import Image -+from PIL import Image - # for reading pdf - try: - from pyPdf import PdfFileReader -@@ -173,7 +174,7 @@ - file.add_string_attribute('pixeldimensions',"[image read error]") - - # video/flac handling -- if file.is_mime_type('video/x-msvideo') | file.is_mime_type('video/mpeg') | file.is_mime_type('video/x-ms-wmv') | file.is_mime_type('video/mp4') | file.is_mime_type('audio/x-flac') | file.is_mime_type('video/x-flv') | file.is_mime_type('video/x-matroska') | file.is_mime_type('audio/x-wav'): -+ if False or file.is_mime_type('video/x-msvideo') | file.is_mime_type('video/mpeg') | file.is_mime_type('video/x-ms-wmv') | file.is_mime_type('video/mp4') | file.is_mime_type('audio/x-flac') | file.is_mime_type('video/x-flv') | file.is_mime_type('video/x-matroska') | file.is_mime_type('audio/x-wav'): - try: - info=kaa.metadata.parse(filename) - try: file.add_string_attribute('length',"%02i:%02i:%02i" % ((int(info.length/3600)), (int(info.length/60%60)), (int(info.length%60)))) diff --git a/pillow.patch b/pillow.patch new file mode 100644 index 000000000000..b661f4346368 --- /dev/null +++ b/pillow.patch @@ -0,0 +1,69 @@ +diff -Naur ./nemo-media-columns-3.2.1+betsy.orig/nemo-media-columns.py ./nemo-media-columns-3.2.1+betsy/nemo-media-columns.py +--- ./nemo-media-columns-3.2.1+betsy.orig/nemo-media-columns.py 2017-02-02 13:16:13.056986227 -0500 ++++ ./nemo-media-columns-3.2.1+betsy/nemo-media-columns.py 2017-02-02 13:16:37.710320043 -0500 +@@ -5,7 +5,7 @@ + # jmdsdf: version 2 adds extra ID3 and EXIF tag support + # jmdsdf: added better error handling for ID3 tags, added mp3 length support, distinguished + # between exif image size and true image size +-# SabreWolfy: set consistent hh:mm:ss format, fixed bug with no ID3 information ++# SabreWolfy: set consistent hh:mm:ss format, fixed bug with no ID3 information + # throwing an unhandled exception + # jmdsdf: fixed closing file handles with mpinfo (thanks gueba) + # jmdsdf: fixed closing file handles when there's an exception (thanks Pitxyoki) +@@ -33,7 +33,10 @@ + # for reading videos. for future improvement, this can also read mp3! + import kaa.metadata + # for reading image dimensions +-import Image ++try: ++ from PIL import Image ++except: ++ import Image + # for reading pdf + try: + from pyPdf import PdfFileReader +@@ -89,7 +92,7 @@ + + # strip file:// to get absolute path + filename = urllib.unquote(file.get_uri()[7:]) +- ++ + # mp3 handling + if file.is_mime_type('audio/mpeg'): + # attempt to read ID3 tag +@@ -117,7 +120,7 @@ + file.add_string_attribute('tracknumber', "[no ID3]") + file.add_string_attribute('genre', "[no ID3]") + file.add_string_attribute('date', "[no ID3]") +- ++ + # try to read MP3 information (bitrate, length, samplerate) + try: + mpfile = open (filename) +@@ -136,7 +139,7 @@ + try: + mpfile.close() + except: pass +- ++ + # image handling + if file.is_mime_type('image/jpeg') or file.is_mime_type('image/png') or file.is_mime_type('image/gif') or file.is_mime_type('image/bmp'): + # EXIF handling routines +@@ -204,7 +207,7 @@ + try: file.add_string_attribute('tracknumber',info.trackno) + except: file.add_string_attribute('tracknumber', '[n/a]') + try: file.add_string_attribute('date',info.userdate) +- except: file.add_string_attribute('date', '[n/a]') ++ except: file.add_string_attribute('date', '[n/a]') + try: file.add_string_attribute('album',info.album) + except: file.add_string_attribute('album', '[n/a]') + except: +@@ -231,7 +234,7 @@ + except: + file.add_string_attribute('title', "[no info]") + file.add_string_attribute('artist', "[no info]") +- ++ + self.get_columns() + + def get_name_and_desc(self): |