Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ libquirc.so*
.*.swp
*~
.DS_Store
.idea
.idea
quirc.pc
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ QUIRC_CXXFLAGS = $(QUIRC_CFLAGS) $(OPENCV_CFLAGS) --std=c++17

.PHONY: all v4l sdl opencv install uninstall clean

all: libquirc.$(LIB_SUFFIX) qrtest
all: libquirc.$(LIB_SUFFIX) qrtest quirc.pc

v4l: quirc-scanner

Expand Down Expand Up @@ -86,14 +86,19 @@ libquirc.$(LIB_SUFFIX): libquirc.$(VERSIONED_LIB_SUFFIX)
libquirc.$(VERSIONED_LIB_SUFFIX): $(LIB_OBJ)
$(CC) -shared -o $@ $(LIB_OBJ) $(LDFLAGS) -lm

quirc.pc: quirc.pc.in
sed -e 's|@PREFIX@|$(PREFIX)|g' \
-e 's|@VERSION@|$(LIB_VERSION)|g' \
quirc.pc.in > quirc.pc

.c.o:
$(CC) $(QUIRC_CFLAGS) -o $@ -c $<

.SUFFIXES: .cxx
.cxx.o:
$(CXX) $(QUIRC_CXXFLAGS) -o $@ -c $<

install: libquirc.a libquirc.$(LIB_SUFFIX) quirc-demo quirc-scanner
install: libquirc.a libquirc.$(LIB_SUFFIX) quirc-demo quirc-scanner quirc.pc
install -o root -g root -m 0644 lib/quirc.h $(DESTDIR)$(PREFIX)/include
install -o root -g root -m 0644 libquirc.a $(DESTDIR)$(PREFIX)/lib
install -o root -g root -m 0755 libquirc.$(VERSIONED_LIB_SUFFIX) \
Expand All @@ -102,6 +107,8 @@ install: libquirc.a libquirc.$(LIB_SUFFIX) quirc-demo quirc-scanner
install -o root -g root -m 0755 quirc-demo $(DESTDIR)$(PREFIX)/bin
# install -o root -g root -m 0755 quirc-demo-opencv $(DESTDIR)$(PREFIX)/bin
install -o root -g root -m 0755 quirc-scanner $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)$(PREFIX)/lib/pkgconfig
install -o root -g root -m 0644 quirc.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig

uninstall:
rm -f $(DESTDIR)$(PREFIX)/include/quirc.h
Expand All @@ -110,6 +117,7 @@ uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/quirc-demo
rm -f $(DESTDIR)$(PREFIX)/bin/quirc-demo-opencv
rm -f $(DESTDIR)$(PREFIX)/bin/quirc-scanner
rm -f $(DESTDIR)$(PREFIX)/lib/pkgconfig/quirc.pc

clean:
rm -f */*.o
Expand All @@ -122,3 +130,4 @@ clean:
rm -f quirc-demo
rm -f quirc-demo-opencv
rm -f quirc-scanner
rm -f quirc.pc
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
quirc (1.2+deb12-1) unstable; urgency=medium

* Initial Debian package

-- Daniel Beer <dlbeer@gmail.com> Tue, 01 Jul 2025 12:00:00 +0000
47 changes: 47 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Source: quirc
Section: libs
Priority: optional
Maintainer: Daniel Beer <dlbeer@gmail.com>
Build-Depends: debhelper-compat (= 13),
pkg-config,
libjpeg-dev
Standards-Version: 4.6.2
Homepage: https://github.com/dlbeer/quirc
Vcs-Git: https://github.com/dlbeer/quirc.git
Vcs-Browser: https://github.com/dlbeer/quirc

Package: libquirc1
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: QR code recognition library
Quirc is a library for extracting and decoding QR codes from images.
It has several features which make it a good choice for this purpose:
.
* It is fast enough to be used with realtime video
* It has a robust and tolerant recognition algorithm
* It is easy to use, with a simple API
* It is small and easily embeddable
* It has a very small memory footprint
* It uses no global mutable state, and is safe to use in a multithreaded
application
* ISC-licensed, with almost no restrictions regarding use and/or modification

Package: libquirc-dev
Section: libdevel
Architecture: any
Depends: libquirc1 (= ${binary:Version}), ${misc:Depends}
Description: QR code recognition library - development files
Quirc is a library for extracting and decoding QR codes from images.
.
This package contains the development files (headers and static library)
for libquirc.

Package: quirc-utils
Section: utils
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: QR code recognition utilities
Quirc is a library for extracting and decoding QR codes from images.
.
This package contains command-line utilities:
* quirc-scanner: command-line QR code scanner
21 changes: 21 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: quirc
Upstream-Contact: Daniel Beer <dlbeer@gmail.com>
Source: https://github.com/dlbeer/quirc

Files: *
Copyright: 2010-2012 Daniel Beer <dlbeer@gmail.com>
License: ISC

License: ISC
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3 changes: 3 additions & 0 deletions debian/libquirc-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/include/quirc.h
usr/lib/libquirc.a
usr/lib/pkgconfig/quirc.pc
2 changes: 2 additions & 0 deletions debian/libquirc1.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/lib/libquirc.so.*
usr/lib/libquirc.so
1 change: 1 addition & 0 deletions debian/libquirc1.shlibs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libquirc 1.2 libquirc1 (>= 1.2)
1 change: 1 addition & 0 deletions debian/quirc-utils.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin/quirc-scanner
29 changes: 29 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
dh $@

override_dh_auto_build:
$(MAKE) all v4l SDL_CFLAGS= SDL_LIBS= CFLAGS="-O3 -Wall -fPIC -DQUIRC_MAX_REGIONS=65534"

override_dh_auto_install:
# Install only the components we need without SDL dependencies
mkdir -p $(CURDIR)/debian/tmp/usr/lib
mkdir -p $(CURDIR)/debian/tmp/usr/include
mkdir -p $(CURDIR)/debian/tmp/usr/bin
mkdir -p $(CURDIR)/debian/tmp/usr/lib/pkgconfig

# Install library files directly to tmp, let dh_install handle distribution
install -m 0644 lib/quirc.h $(CURDIR)/debian/tmp/usr/include/
install -m 0644 libquirc.a $(CURDIR)/debian/tmp/usr/lib/
install -m 0755 libquirc.so.1.2 $(CURDIR)/debian/tmp/usr/lib/
ln -s libquirc.so.1.2 $(CURDIR)/debian/tmp/usr/lib/libquirc.so
install -m 0755 quirc-scanner $(CURDIR)/debian/tmp/usr/bin/
install -m 0644 quirc.pc $(CURDIR)/debian/tmp/usr/lib/pkgconfig/

override_dh_auto_clean:
$(MAKE) clean
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
10 changes: 10 additions & 0 deletions quirc.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: quirc
Description: QR-code recognition library
Version: @VERSION@
Libs: -L${libdir} -lquirc -lm
Cflags: -I${includedir}