SET_TARGET_PROPERTIES(json_script PROPERTIES VERSION ${ABIVERSION})
SET_TARGET_PROPERTIES(blobmsg_json PROPERTIES VERSION ${ABIVERSION})
ENDIF()
+
+ADD_CUSTOM_TARGET(debian
+ COMMAND ${CMAKE_COMMAND} -E echo "Generating debian/changelog from git..."
+ COMMAND ${CMAKE_SOURCE_DIR}/debian/generate-changelog.sh
+ COMMAND dpkg-buildpackage -b -uc -us
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMENT "Building Debian package"
+)
--- /dev/null
+Source: libubox
+Section: libs
+Priority: optional
+Standards-Version: 4.5.0
+Rules-Requires-Root: no
+Build-Depends: debhelper-compat (= 12), cmake, pkgconf, libjson-c-dev
+Homepage: https://git.openwrt.org/project/libubox.git
+Vcs-Browser: https://git.openwrt.org/project/libubox.git
+Vcs-Git: https://git.openwrt.org/project/libubox.git
+
+Package: libubox
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Section: libs
+Description: OpenWrt utility library
+ Libubox is a utility library used by OpenWrt. It provides various data
+ structures (AVL tree, linked lists, blob format, key-value lists) and
+ utilities (event loop, socket helpers, base64 encoding, MD5 hashing,
+ logging) commonly used in OpenWrt.
+ .
+ This package contains the shared libraries: libubox, libblobmsg_json,
+ and libjson_script.
+
+Package: libubox-dev
+Architecture: any
+Multi-Arch: same
+Depends: libubox (= ${binary:Version}), libc6-dev|libc-dev, libjson-c-dev, ${misc:Depends}
+Section: libdevel
+Description: Development files for libubox
+ Libubox is a utility library used by OpenWrt. It provides various data
+ structures (AVL tree, linked lists, blob format, key-value lists) and
+ utilities (event loop, socket helpers, base64 encoding, MD5 hashing,
+ logging) commonly used in OpenWrt.
+ .
+ This package contains the development files (headers, static libraries,
+ and symlinks) for libubox.
+
+Package: libubox-utils
+Architecture: any
+Multi-Arch: foreign
+Depends: libubox (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Utility programs for libubox
+ Libubox is a utility library used by OpenWrt. It provides various data
+ structures (AVL tree, linked lists, blob format, key-value lists) and
+ utilities (event loop, socket helpers, base64 encoding, MD5 hashing,
+ logging) commonly used in OpenWrt.
+ .
+ This package contains the jshn utility for JSON shell integration and
+ helper shell scripts.
--- /dev/null
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: libubox
+Source: https://git.openwrt.org/project/libubox.git
+
+Files: *
+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.
--- /dev/null
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+BUILD_DIR = obj-$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+%:
+ dh $@ --builddirectory=$(BUILD_DIR)
+
+override_dh_auto_clean:
+ dh_auto_clean --builddirectory=$(BUILD_DIR)
+ rm -rf $(BUILD_DIR)
+
+override_dh_auto_configure:
+ cmake -S . -B $(BUILD_DIR) \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DABIVERSION=$(shell dpkg-parsechangelog | sed -rne 's/^Version: 0\.0\.([0-9]+).*$$/\1/p') \
+ -DBUILD_LUA=OFF \
+ -DBUILD_EXAMPLES=OFF