[packages/php-phpqrcode] new, version 1.1.4
glen
glen at pld-linux.org
Sat Mar 29 12:23:17 CET 2014
commit 2cf2c56555ce76bcceb32e1531db9d0d647e6518
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Mar 29 13:22:46 2014 +0200
new, version 1.1.4
based on debian package
cache-path.patch | 17 ++++++++++++++
php-phpqrcode.spec | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 82 insertions(+)
---
diff --git a/php-phpqrcode.spec b/php-phpqrcode.spec
new file mode 100644
index 0000000..5bc765e
--- /dev/null
+++ b/php-phpqrcode.spec
@@ -0,0 +1,65 @@
+%define pkgname phpqrcode
+%define php_min_version 5.0.0
+%include /usr/lib/rpm/macros.php
+Summary: PHP library for generating two-dimensional barcodes
+Name: php-%{pkgname}
+Version: 1.1.4
+Release: 1
+License: LGPL v3
+Group: Development/Languages/PHP
+Source0: http://downloads.sourceforge.net/phpqrcode/phpqrcode-2010100721_%{version}.zip
+# Source0-md5: 64c2459b64b7efdb2e82fd714bbe03e7
+Patch0: cache-path.patch
+URL: http://phpqrcode.sourceforge.net/
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
+BuildRequires: rpmbuild(macros) >= 1.553
+BuildRequires: unzip
+Requires: php(core) >= %{php_min_version}
+Requires: php(date)
+Requires: php(gd)
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _appdir %{php_data_dir}/%{pkgname}
+%define _cachedir /var/cache/php/%{pkgname}
+
+%description
+PHP QR Code is a library for generating QR Codes, 2-dimensional
+barcodes. It is based on the libqrencode C library and provides an API
+for creating QR Code barcode images (PNG and JPEG).
+
+Some of the library features include:
+- Supports QR Code versions (size) 1-40
+- Numeric, Alphanumeric, 8-bit and Kanji encoding.
+- Exports to PNG, JPEG images, also exports as bit-table
+- TCPDF 2-D barcode API integration
+- Easy to configure
+- Data cache for calculation speed-up
+- Debug data dump, error logging, time benchmarking
+
+%prep
+%setup -qc
+mv phpqrcode/* .
+%undos -f php CHANGELOG INSTALL README
+%patch0 -p1
+
+install -d examples
+mv index.php examples
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_appdir},%{_cachedir}}
+cp -a *.php bindings $RPM_BUILD_ROOT%{_appdir}
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README INSTALL CHANGELOG
+%{php_data_dir}/phpqrcode
+%attr(730,root,http) %dir %verify(not group mode) /var/cache/php/phpqrcode
+%{_examplesdir}/%{name}-%{version}
diff --git a/cache-path.patch b/cache-path.patch
new file mode 100644
index 0000000..a2217b0
--- /dev/null
+++ b/cache-path.patch
@@ -0,0 +1,17 @@
+Description: Debian-specific paths and defaults
+Forwarded: not-needed
+Author: Thijs Kinkhorst <thijs at debian.org>
+
+--- a/qrconfig.php 2013-01-23 14:55:45.858052303 +0100
++++ b/qrconfig.php 2013-01-23 14:55:57.377754931 +0100
+@@ -6,8 +6,8 @@
+ */
+
+ define('QR_CACHEABLE', true); // use cache - more disk reads but less CPU power, masks and format templates are stored there
+- define('QR_CACHE_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR); // used when QR_CACHEABLE === true
+- define('QR_LOG_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR); // default error logs dir
++ define('QR_CACHE_DIR', '/var/cache/php/phpqrcode/'); // used when QR_CACHEABLE === true
++ define('QR_LOG_DIR', false); // default error logs dir
+
+ define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
+ define('QR_FIND_FROM_RANDOM', false); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-phpqrcode.git/commitdiff/2cf2c56555ce76bcceb32e1531db9d0d647e6518
More information about the pld-cvs-commit
mailing list