Преглед изворни кода

Merge pull request #53 from troglobit/packaging

ChangeLog updates, Debian packaging support
Joachim Nilsson пре 5 година
родитељ
комит
b4291f7d0e
No account linked to committer's email
16 измењених фајлова са 205 додато и 20 уклоњено
  1. 1
    1
      .gitignore
  2. 0
    13
      CHANGELOG
  3. 0
    0
      COPYING
  4. 113
    0
      ChangeLog.md
  5. 12
    5
      Makefile.am
  6. 1
    1
      README.md
  7. 3
    0
      debian/.gitignore
  8. 6
    0
      debian/changelog
  9. 1
    0
      debian/compat
  10. 14
    0
      debian/control
  11. 31
    0
      debian/copyright
  12. 1
    0
      debian/docs
  13. 17
    0
      debian/rules
  14. 1
    0
      debian/source/format
  15. 1
    0
      debian/source/options
  16. 3
    0
      debian/watch

+ 1
- 1
.gitignore Прегледај датотеку

@@ -19,4 +19,4 @@ install-sh
19 19
 missing
20 20
 stamp-h1
21 21
 Makefile
22
-Makefile.in
22
+Makefile.in

+ 0
- 13
CHANGELOG Прегледај датотеку

@@ -1,13 +0,0 @@
1
-0.9
2
-  * Complete rewrite of program (Every single byte)
3
-  * Cleaner, safer code
4
-  * Completely new intuitive usage (Sorry, it was needed)
5
-  * Added functionality:
6
-    * Ability to set/get minimum brightness directly from commandline
7
-    * Ability to specify the backlight controller to use directly from commandline
8
-    * Better verbosity
9
-
10
-  * Probably missed some stuff
11
-
12
-0.7
13
-  * Ported bash script to C.


+ 113
- 0
ChangeLog.md Прегледај датотеку

@@ -0,0 +1,113 @@
1
+Change Log
2
+==========
3
+
4
+All relevant changes to the project are documented in this file.
5
+
6
+
7
+[v1.2][UNRELEASED] - 2018-08-xx
8
+-------------------------------
9
+
10
+### Changes
11
+- Convert to GNU configure & build system
12
+- Add support for installing non-SUID root using an udev rule
13
+  enabled `--with-udev` to the new configure script
14
+- Migrate to use `~/.cache/light` instead of `/etc/light` for
15
+  unpriviliged operation
16
+- Add proper light.1 man page, remvoes help2man dependency
17
+- Simplify presentation of commands and options in built-in help text,
18
+  as well as in the README and man page
19
+- Change to Linux coding style
20
+- Add Fedora installation instructions
21
+
22
+
23
+[v1.1.2][] - 2018-06-20
24
+-----------------------
25
+
26
+Panic release to fix save/restore.
27
+
28
+### Changes
29
+- Add help2man dependency in README
30
+- Better Support for Overriding Install Prefix
31
+- Restore DESTDIR support
32
+
33
+### Fixes
34
+- Issue #29: Fix save and restore arguments
35
+- Issue #27: Use the install command instead of raw cp/mv/chmod.
36
+
37
+
38
+[v1.1][] - 2017-11-23
39
+---------------------
40
+
41
+Various fixes and improvements.  Credits to Abdullah ibn Nadjo
42
+
43
+### Changes
44
+- Add `-k` flag for keyboard backlight support
45
+- Cache max brightness data from automatic controller detection
46
+- Improve overall logging
47
+- Logging of clamps, saves and restores
48
+- Support for save, restore, get [max] brightness etc. for both screen
49
+  and keyboard controllers
50
+
51
+### Fixes
52
+- Avoid checking for write permission if just getting value
53
+- Check if controller is accessible before getting value
54
+- Avoid redondant checking
55
+- Don't truncate file contents when checking if file is writable
56
+- Fix `light_controllerAccessible()` and `light_getBrightness()` this
57
+  functions were:
58
+   - Reading values from the controller
59
+   - Checking write permission even when we just want reading values
60
+   - Checking the mincap file instead of the actual controller
61
+- Don't try to read brightness values when only targetting max bright
62
+- Fix issues with string buffers and pointers
63
+  - Use `NAME_MAX` and `PATH_MAX` instead of hardcoded values
64
+  - Allow paths to be longer than 256 chars
65
+  - Check pointers everywhere
66
+  - Use `strncpy()`/`snprintf()` instead of `strcpy()`/`sprintf()`
67
+  - Validate controllers' name (`-s` flag + a very long name = bad
68
+    things happening)
69
+  - Get rid of globals for dir iteration
70
+
71
+
72
+[v1.0][] - 2016-05-10
73
+---------------------
74
+
75
+First major release.  Light has been around for a while now and seems to
76
+make some people happy.  Also someone wanted a new release, so here you
77
+go!
78
+
79
+### Changes
80
+- Added save/restore functionality
81
+- Generate man page on `make install`
82
+
83
+### Fixes
84
+- Issue #5: Can't increase brightness on ATI propietary driver
85
+- Issue #10: Honor `$DESTDIR` on man page installation
86
+
87
+
88
+[v0.9][] - 2014-06-08
89
+---------------------
90
+
91
+### Changes
92
+- Complete rewrite of program (Every single byte)
93
+- Cleaner, safer code
94
+- Completely new intuitive usage (Sorry, it was needed)
95
+- Added functionality:
96
+  - Ability to set/get minimum brightness directly from commandline
97
+  - Ability to specify the backlight controller to use directly from commandline
98
+  - Better verbosity
99
+- Probably missed some stuff
100
+
101
+
102
+v0.7 - 2012-11-18
103
+-----------------
104
+
105
+### Changes
106
+- Ported bash script to C
107
+
108
+
109
+[UNRELEASED]: https://github.com/haikarainen/light/compare/v1.1.2...HEAD
110
+[v1.1.2]:     https://github.com/haikarainen/light/compare/v1.1...v1.1.2
111
+[v1.1]:       https://github.com/haikarainen/light/compare/v1.0...v1.1
112
+[v1.0]:       https://github.com/haikarainen/light/compare/v0.9...v1.0
113
+[v0.9]:       https://github.com/haikarainen/light/compare/v0.7...v0.9

+ 12
- 5
Makefile.am Прегледај датотеку

@@ -1,17 +1,21 @@
1 1
 SUBDIRS        = src
2 2
 dist_man1_MANS = light.1
3
-doc_DATA       = README.md LICENSE CHANGELOG
4
-EXTRA_DIST     = README.md LICENSE CHANGELOG
3
+doc_DATA       = README.md COPYING ChangeLog.md
4
+EXTRA_DIST     = README.md COPYING ChangeLog.md
5 5
 
6 6
 if UDEV
7 7
 udev_DATA      = 90-backlight.rules
8 8
 EXTRA_DIST    += $(top_srcdir)/90-backlight.rules
9 9
 endif
10 10
 
11
+# lintian --profile debian -i -I --show-overrides ../$PKG.changes
12
+package:
13
+	dpkg-buildpackage -uc -us -B
14
+
11 15
 #
12 16
 # Target to run when building a release
13 17
 #
14
-release: distcheck
18
+release: distcheck package
15 19
 	@for file in $(DIST_ARCHIVES); do	\
16 20
 		md5sum $$file > ../$$file.md5;	\
17 21
 	done
@@ -20,6 +24,9 @@ release: distcheck
20 24
 	@echo "Resulting release files:"
21 25
 	@echo "================================================================="
22 26
 	@for file in $(DIST_ARCHIVES); do					\
23
-		printf "$$file    \tDistribution tarball\n";			\
24
-		printf "$$file.md5\t"; cat ../$$file.md5 | cut -f1 -d' ';	\
27
+		printf "%-32s Distribution tarball\n" $$file;			\
28
+		printf "%-32s " $$file.md5; cat ../$$file.md5 | cut -f1 -d' ';	\
29
+	done
30
+	@for file in `cd ..; ls $(PACKAGE)_$(VERSION)*`; do			\
31
+		printf "%-32s Debian/Ubuntu file\n" $$file;			\
25 32
 	done

+ 1
- 1
README.md Прегледај датотеку

@@ -189,7 +189,7 @@ configure script to enable this mode of operation:
189 189
     ./configure --with-udev && make
190 190
     sudo make install
191 191
 
192
-This installs the file `90-backlight.rules` into `/lib/udev/rules.d/`.
192
+This installs the `90-backlight.rules` into `/usr/lib/udev/rules.d/`.
193 193
 If your udev rules are located elsewhere, use `--with-udev=PATH`.
194 194
 
195 195
 Note, in this mode `light` runs unpriviliged, so the `/etc/light`

+ 3
- 0
debian/.gitignore Прегледај датотеку

@@ -0,0 +1,3 @@
1
+files
2
+light.debhelper.log
3
+light.substvars

+ 6
- 0
debian/changelog Прегледај датотеку

@@ -0,0 +1,6 @@
1
+light (1.2) unstable; urgency=low
2
+
3
+  * Initial Debian Release (Closes: #47)
4
+
5
+ -- Joachim Nilsson <troglobit@gmail.com>  Sun, 12 Aug 2018 22:15:00 +0100
6
+

+ 1
- 0
debian/compat Прегледај датотеку

@@ -0,0 +1 @@
1
+9

+ 14
- 0
debian/control Прегледај датотеку

@@ -0,0 +1,14 @@
1
+Source: light
2
+Section: x11
3
+Priority: optional
4
+Maintainer: Joachim Nilsson <troglobit@gmail.com>
5
+Homepage: https://github.com/haikarainen/light
6
+Build-Depends: debhelper (>= 9~), autoconf
7
+Vcs-Git: https://github.com/haikarainen/light.git
8
+Vcs-Browser: https://github.com/haikarainen/light/commits/
9
+Standards-Version: 3.9.3
10
+
11
+Package: light
12
+Architecture: any
13
+Depends: ${shlibs:Depends}, ${misc:Depends}
14
+Description: a program to control backlight controllers under GNU/Linux

+ 31
- 0
debian/copyright Прегледај датотеку

@@ -0,0 +1,31 @@
1
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
+Upstream-Name: light
3
+Source: https://github.com/haikarainen/light
4
+
5
+Files: *
6
+Copyright: Copyright 2012-2018  Fredrik Haikarainen <fredrik.haikarainen@gmail.com>
7
+License: GPL-3
8
+
9
+Files: debian/*
10
+Copyright: Copyright 2018  Joachim Nilsson <troglobit@gmail.com>
11
+License: GPL-3
12
+
13
+License: GPL-3
14
+ Indicator Weather is free software; you can redistribute it
15
+ and/or modify it under the terms of the GNU General Public
16
+ License version 3 as published by the Free Software Foundation.
17
+ .
18
+ Indicator Weather is distributed in the hope that it will be
19
+ useful, but WITHOUT ANY WARRANTY; without even the implied
20
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
21
+ PURPOSE.  See the GNU General Public License for more
22
+ details. http://www.gnu.org/licenses/
23
+ .
24
+ You should have received a copy of the GNU General Public
25
+ License along with this package; if not, write to the Free
26
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
27
+ Boston, MA  02110-1301 USA
28
+ .
29
+ On Debian systems, the full text of the GNU General Public
30
+ License version 3 can be found in the file
31
+`/usr/share/common-licenses/GPL-3'.

+ 1
- 0
debian/docs Прегледај датотеку

@@ -0,0 +1 @@
1
+README.md

+ 17
- 0
debian/rules Прегледај датотеку

@@ -0,0 +1,17 @@
1
+#!/usr/bin/make -f
2
+# export DH_VERBOSE=1
3
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4
+
5
+%:
6
+	dh $@
7
+
8
+override_dh_auto_configure:
9
+	dh_auto_configure -- --with-udev
10
+
11
+override_dh_installchangelogs:
12
+	dh_installchangelogs ChangeLog.md
13
+
14
+override_dh_auto_install:
15
+	dh_auto_install
16
+	rm -f debian/light/usr/share/doc/light/COPYING
17
+	rm -f debian/light/usr/share/doc/light/ChangeLog.md

+ 1
- 0
debian/source/format Прегледај датотеку

@@ -0,0 +1 @@
1
+3.0 (native)

+ 1
- 0
debian/source/options Прегледај датотеку

@@ -0,0 +1 @@
1
+compression=xz

+ 3
- 0
debian/watch Прегледај датотеку

@@ -0,0 +1,3 @@
1
+version=3
2
+opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/light-$1\.tar\.gz/ \
3
+  https://github.com/haikarainen/light/releases .*/light-?(\d\S*)\.tar\.gz