Skip to content

Commit 5c8a2b8

Browse files
committed
RELEASE: 0.2.2
Merge branch 'release/0.2.2'
2 parents d6b9714 + 90c9e80 commit 5c8a2b8

File tree

8 files changed

+64
-19
lines changed

8 files changed

+64
-19
lines changed

AUTHORS.creole

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
= RatSlap Authors =
2+
3+
[[ http://www.qdnx.org/krayon/ | Krayon (Todd Harbour) ]]
4+
5+
== RatSlap Contributors ==
6+
7+
-
8+
9+
<<< vim:set ts=4 sw=4 tw=80 et cindent ai si syn=creole: >>>

CONTRIBUTING.creole

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
= Contributing =
2+
3+
== Pull Requests ==
4+
5+
If you have a pull request (PR) for a change or a fix, please try to base your
6+
changes off develop unless it's a serious security issue with a specific release
7+
in which case base it off that.
8+
9+
Don't be too concerned if you can't deside, an incorrectly targeted PR is better
10+
than no PR :D
11+
12+
... and Thank you.
13+
14+
<<< vim:set ts=4 sw=4 tw=80 et cindent ai si syn=creole: >>>

CONTRIBUTORS.creole

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AUTHORS.creole

COPYING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LICENSE

Makefile

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,35 @@ CFLAGS += $(CARCH_FLAG) $(CPU_FLAG) $(OPT_FLAGS) $(BUILDOPTS) $(shell pkg
8484
APPNAME = $(shell sed -n 's/^[ \t]*\#define[ \t]*APP_NAME[ \t]*"\([^"]*\)".*$$/\1/p' app.h)
8585
BINNAME = $(shell sed -n 's/^[ \t]*\#define[ \t]*BIN_NAME[ \t]*"\([^"]*\)".*$$/\1/p' app.h)
8686

87-
# Retrieve version
87+
# Retrieve version from git
8888
# This is something like:
89-
# 1.10.5-3-g6ab5527-dirty
89+
# 1.10.5-3-g6ab5527-dirty-ft-cool
9090
# Where:
91-
# 1.10.5 == tag
92-
# -3 == 3 commits ahead of tag
93-
# -g6ab5527 == commit starting with g6ab5527
94-
# -dirty == some files are not in the repository
95-
#APPVER="$(shell grep _APP_VERSION app.h|head -1|cut -d'"' -f2)"
91+
# 1.10.5 == tag / major version
92+
# -3 == 3 commits ahead of tag
93+
# -g6ab5527 == 'g'it commit starting with 6ab5527
94+
# -dirty == some files here changed or not in repository
95+
# -ft-cool == ft-cool branch
96+
MAJVER = $(shell bash -c \
97+
'\
98+
echo -n "$$(git describe --always --tags --match="*" --dirty)" \
99+
')
100+
96101
APPBRANCH = $(shell bash -c \
97102
'\
98-
( \
99-
n="$$(git name-rev --always --name-only --no-undefined HEAD)"; \
100-
[ "$${n}" != "master" ] && echo -n "$${n}" || true \
101-
) \
103+
git name-rev --always --name-only --no-undefined HEAD|sed "s@feature/@ft-@;s@hotfix/\(.*\)@\1.HF@;s@release/\(.*\)@\1.PRE@"\
102104
')
105+
#APPVER="$(shell grep _APP_VERSION app.h|head -1|cut -d'"' -f2)"
103106
APPVER = $(shell bash -c \
104-
'\
105-
git describe --tags --match="*" --dirty &>/dev/null \
106-
&& git describe --always --tags --match="*" --dirty \
107-
|| (echo -n "$(APPBRANCH)-"; git describe --always --tags --dirty) \
108-
')
107+
'\
108+
echo -n "$(MAJVER)"; \
109+
[ ! -z "$(APPBRANCH)" ] && [ "$(APPBRANCH)" != "master" ] && [ "$(APPBRANCH)" != "$(MAJVER)" ] && echo -n "-$(APPBRANCH)" \
110+
')
109111

110112
BUILD_DATE = $(shell date +'%Y-%m-%d %H:%M:%S%z')
111113
BUILD_MONTH = $(shell date +'%B')
112114
BUILD_YEAR = $(shell date +'%Y')
115+
BUILD_COMMIT = $(shell git rev-parse --verify 'HEAD^{commit}')
113116

114117
ARCHIVE_NAME = $(BINNAME)-$(APPVER)
115118
ARCHIVE_FILE = $(ARCHIVE_NAME).$(ARCHIVE_EXT)
@@ -151,6 +154,7 @@ git.h: gitup git.h.TEMPLATE
151154
@sed -i 's#//SOURCE//#// WARNING // Auto-generated file, DO NOT MODIFY //#' git.h
152155
@sed -i 's#\%\%APP_VERSION\%\%#$(APPVER)#' git.h
153156
@sed -i 's#\%\%BUILD_DATE\%\%#$(BUILD_DATE)#' git.h
157+
@sed -i 's#\%\%BUILD_COMMIT\%\%#$(BUILD_COMMIT)#' git.h
154158

155159
log.h: log.h.TEMPLATE
156160
@# Generating log header

README.creole

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@
2626
== Introduction ==
2727

2828
//RatSlap// aims to provide a way to configure configurable Logitech mice from
29-
within Linux.
29+
within Linux. It is licensed under the GNU GPL version 2. For more information,
30+
see [[LICENSE]] / [[COPYING]] .
31+
32+
For a list of authors and contributors, see [[AUTHORS.creole]] /
33+
[[CONTRIBUTORS.creole]] .
34+
35+
For more information on contributing (new feature, bug fix, pull request etc),
36+
please see [[CONTRIBUTING.creole]] .
3037

3138
== Availability ==
3239

@@ -246,6 +253,9 @@ tool cannot do).
246253
** [[https://bugs.qdnx.org/bug/117|QB#117 - Compile fails when ctags missing]]
247254
** Prettier Changelog
248255
** Added man page
256+
* v0.2.2
257+
** [[https://bugs.qdnx.org/121|QB#121 - set_debug is deprecated, use libusb_set_option instead]]
258+
** Added some documentation: AUTHORS, CONTRIBUTING
249259
250260
== TODO ==
251261

git.h.TEMPLATE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
#define GIT_H
3131

3232
// SemVer ( Semantic Versioning - http://semver.org/ )
33-
#define APP_VERSION "%%APP_VERSION%%"
34-
#define BUILD_DATE "%%BUILD_DATE%%"
33+
#define APP_VERSION "%%APP_VERSION%%"
34+
#define BUILD_DATE "%%BUILD_DATE%%"
35+
#define BUILD_COMMIT "%%BUILD_COMMIT%%"
3536

3637
#endif /* GIT_H */

main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,12 @@ static libusb_context *usb_init(void) {
551551
}
552552

553553
// FIXME: Set debug?
554+
555+
#if LIBUSBX_API_VERSION < 0x01000106
554556
libusb_set_debug(usb_ctx, 3);
557+
#else
558+
libusb_set_option(usb_ctx, LIBUSB_OPTION_LOG_LEVEL, 3);
559+
#endif
555560

556561
return usb_ctx;
557562
}

0 commit comments

Comments
 (0)