commit ghc-nfc for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package ghc-nfc for openSUSE:Factory checked in at 2017-08-31 20:57:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-nfc (Old)
and /work/SRC/openSUSE:Factory/.ghc-nfc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-nfc"
Thu Aug 31 20:57:32 2017 rev:2 rq:513440 version:0.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-nfc/ghc-nfc.changes 2017-04-12 18:08:04.491029521 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-nfc.new/ghc-nfc.changes 2017-08-31 20:57:33.454193276 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:06:43 UTC 2017 - psimons@suse.com
+
+- Update to version 0.1.0.
+
+-------------------------------------------------------------------
Old:
----
nfc-0.0.1.tar.gz
New:
----
nfc-0.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-nfc.spec ++++++
--- /var/tmp/diff_new_pack.bZ2TXO/_old 2017-08-31 20:57:34.298074709 +0200
+++ /var/tmp/diff_new_pack.bZ2TXO/_new 2017-08-31 20:57:34.310073022 +0200
@@ -18,7 +18,7 @@
%global pkg_name nfc
Name: ghc-%{pkg_name}
-Version: 0.0.1
+Version: 0.1.0
Release: 0
Summary: Libnfc bindings
License: SUSE-Public-Domain
++++++ nfc-0.0.1.tar.gz -> nfc-0.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfc-0.0.1/CHANGELOG.md new/nfc-0.1.0/CHANGELOG.md
--- old/nfc-0.0.1/CHANGELOG.md 2016-12-09 08:24:58.000000000 +0100
+++ new/nfc-0.1.0/CHANGELOG.md 2016-12-20 19:00:25.000000000 +0100
@@ -1,3 +1,3 @@
-# 0.0.0
+# 0.0.1
* Initial release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfc-0.0.1/cbits/NFC.c new/nfc-0.1.0/cbits/NFC.c
--- old/nfc-0.0.1/cbits/NFC.c 1970-01-01 01:00:00.000000000 +0100
+++ new/nfc-0.1.0/cbits/NFC.c 2017-02-22 18:33:33.000000000 +0100
@@ -0,0 +1,33 @@
+#include "nfc/nfc.h"
+#include "nfc/nfc-types.h"
+
+/* These functions are needed because the libnfc author used #pragma pack(1).
+ * c2hs does not recognize this compiler directive.
+ */
+nfc_modulation *hs_nfc_get_nm(nfc_target *t) { return &t->nm; }
+
+size_t hs_nfc_target_size() { return sizeof(nfc_target); }
+
+uint8_t *hs_nfc_get_nai_abtAtqa(nfc_target *t) { return t->nti.nai.abtAtqa; }
+uint8_t hs_nfc_get_nai_btSak(nfc_target *t) { return t->nti.nai.btSak; }
+size_t hs_nfc_get_nai_szUidLen(nfc_target *t) { return t->nti.nai.szUidLen; }
+uint8_t *hs_nfc_get_nai_abtUid(nfc_target *t) { return t->nti.nai.abtUid; }
+size_t hs_nfc_get_nai_szAtsLen(nfc_target *t) { return t->nti.nai.szAtsLen; }
+uint8_t *hs_nfc_get_nai_abtAts(nfc_target *t) { return t->nti.nai.abtAts; }
+
+/* Normally I would have c2hs make this for me, but I need to return Nothing or
+ * Just NFCTarget based on the return value, which c2hs does not support at this
+ * time.
+ */
+int __wrapped__nfc_initiator_select_passive_target (nfc_device *pnd,
+ const nfc_modulation *nm,
+ const uint8_t *pbtInitData,
+ const size_t szInitData,
+ nfc_target *pnt)
+{
+ return nfc_initiator_select_passive_target (pnd,
+ *nm,
+ pbtInitData,
+ szInitData,
+ pnt);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfc-0.0.1/examples/print-mifare-uid-forever.hs new/nfc-0.1.0/examples/print-mifare-uid-forever.hs
--- old/nfc-0.0.1/examples/print-mifare-uid-forever.hs 2016-12-14 19:34:18.000000000 +0100
+++ new/nfc-0.1.0/examples/print-mifare-uid-forever.hs 2017-02-22 18:32:27.000000000 +0100
@@ -16,6 +16,9 @@
Just d -> do
void $ initiatorInit d
forever $ do
- let nfcMod = NFCModulation NmtIso14443a Nbr106
- (_, NFCTargetISO14443a info) <- initiatorSelectPassiveTarget d nfcMod Nothing
- C8.putStrLn $ encode $ iso14443aAbtUid info
+ let nfcMod = NFCModulation NmtIso14443a Nbr106
+ maybeTarget <- initiatorSelectPassiveTarget d nfcMod Nothing
+ -- OR: maybeTarget <- initiatorPollTarget d [nfcMod] 7 5
+ case maybeTarget of
+ Just (NFCTargetISO14443a info) -> C8.putStrLn . encode $ iso14443aAbtUid info
+ _ -> return ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfc-0.0.1/nfc.cabal new/nfc-0.1.0/nfc.cabal
--- old/nfc-0.0.1/nfc.cabal 2016-12-20 18:58:27.000000000 +0100
+++ new/nfc-0.1.0/nfc.cabal 2017-02-22 19:23:23.000000000 +0100
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.15.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
--
-- see: https://github.com/sol/hpack
name: nfc
-version: 0.0.1
+version: 0.1.0
synopsis: libnfc bindings
description: nfc is a set of bindings to libnfc
category: Bindings
@@ -33,6 +33,8 @@
hs-source-dirs:
src
ghc-options: -Wall
+ c-sources:
+ cbits/NFC.c
extra-libraries:
nfc
build-depends:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nfc-0.0.1/package.yaml new/nfc-0.1.0/package.yaml
--- old/nfc-0.0.1/package.yaml 2016-12-20 18:58:25.000000000 +0100
+++ new/nfc-0.1.0/package.yaml 2017-02-22 19:23:05.000000000 +0100
@@ -1,6 +1,6 @@
name: nfc
synopsis: libnfc bindings
-version: '0.0.1'
+version: '0.1.0'
license: PublicDomain
maintainer: John Galt
participants (1)
-
root@hilbert.suse.de