1
0
Fork 0

added intiail source

This commit is contained in:
Sangbum Kim 2016-12-07 01:01:26 +09:00
commit 28062507f8
5 changed files with 157 additions and 0 deletions

13
.SRCINFO Normal file
View File

@ -0,0 +1,13 @@
pkgbase = lightum-git
pkgdesc = Lightum is a daemon to control the keyboard brightness and screen backlight on MacBook based laptops.
pkgver = 2.3.1
pkgrel = 1
url = https://github.com/poliva/lightum
arch = i386
arch = x86_64
license = GPL2
source = lightum-git::git://github.com/poliva/lightum.git
md5sums = SKIP
pkgname = lightum-git

50
.gitignore vendored Normal file
View File

@ -0,0 +1,50 @@
# Created by https://www.gitignore.io/api/rchlinuxpackages,archives,linux
#!! ERROR: rchlinuxpackages is undefined. Use list command to see defined gitignore types !!#
### Archives ###
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
*.bzip
*.bz2
*.xz
*.lzma
*.cab
#packing-only formats
*.iso
*.tar
#package management formats
*.dmg
*.xpi
*.gem
*.egg
*.deb
*.rpm
*.msi
*.msm
*.msp
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
/lightum-git/
/src
/pkg

40
Makefile Normal file
View File

@ -0,0 +1,40 @@
DESTDIR?=/
SHELL = /bin/sh
CC?=gcc
CDEBUGFLAGS= -g -O2
CFLAGS = `pkg-config --cflags dbus-1 --cflags glib-2.0 --cflags gio-2.0 --cflags systemd` -Wall -Wextra -Wwrite-strings $(CDEBUGFLAGS)
LDFLAGS= `pkg-config --libs dbus-1 --libs glib-2.0 --libs gio-2.0 --cflags systemd` $(CDEBUGFLAGS) -lX11 -lXext -lXss -lm -lsystemd
INSTALL = /usr/bin/install -c
INSTALLDATA = /usr/bin/install -c -m 644
srcdir = .
prefix = $(DESTDIR)
bindir = $(prefix)/usr/bin
docdir = $(prefix)/usr/share/doc
mandir = $(prefix)/usr/share/man
OBJ=functions.o dbus.o dbus-session.o configfile.o lightum.o xbacklight.o
BIN=lightum
all: ${OBJ}
$(CC) $(CFLAGS) ${OBJ} $(LDFLAGS) -o ${BIN}
install: all
mkdir -p $(bindir)
$(INSTALL) lightum $(bindir)/lightum
mkdir -p $(prefix)/etc/xdg/autostart/
$(INSTALLDATA) lightum.desktop $(prefix)/etc/xdg/autostart/
mkdir -p $(docdir)/lightum/
$(INSTALLDATA) $(srcdir)/README $(docdir)/lightum/
$(INSTALLDATA) $(srcdir)/LICENSE $(docdir)/lightum/
mkdir -p $(mandir)/man1/
$(INSTALLDATA) $(srcdir)/lightum.1 $(mandir)/man1/
uninstall:
rm -rf $(bindir)/lightum
rm -rf $(prefix)/etc/xdg/autostart/lightum.desktop
rm -rf $(docdir)/lightum/
rm -rf $(mandir)/man1/lightum.1
clean:
rm -f lightum *.o

41
PKGBUILD Normal file
View File

@ -0,0 +1,41 @@
#Maintainer: "Kirk Gleason <kirk at kirkg dot us>"
pkgname=lightum-git
pkgver=2.3.1
pkgrel=1
pkgdesc="Lightum is a daemon to control the keyboard brightness and screen backlight on MacBook based laptops."
arch=(i386 x86_64)
url="https://github.com/poliva/lightum"
license=('GPL2')
md5sums=('SKIP'
'7a1b299d9507b34a1bd0a916ae5fc75c')
source=(
'lightum-git::git://github.com/skystrife/lightum.git'
'modern.patch'
)
pkgver() {
cd "$pkgname"
git describe --always | sed 's|v||;s|-.*||'
}
prepare() {
cd "$pkgname"
patch -p1 -i "${srcdir}"/modern.patch
}
build() {
cd "$pkgname"
make
}
check() {
cd "$pkgname"
true
}
package() {
cd "$pkgname"
make DESTDIR="$pkgdir/" install
}

13
modern.patch Normal file
View File

@ -0,0 +1,13 @@
--- a/Makefile 2016-12-07 00:28:46.496831443 +0900
+++ b/Makefile 2016-12-07 00:28:27.876657953 +0900
@@ -2,8 +2,8 @@
SHELL = /bin/sh
CC?=gcc
CDEBUGFLAGS= -g -O2
-CFLAGS = `pkg-config --cflags dbus-1 --cflags glib-2.0 --cflags gio-2.0 --cflags libsystemd-login` -Wall -Wextra -Wwrite-strings $(CDEBUGFLAGS)
-LDFLAGS= `pkg-config --libs dbus-1 --libs glib-2.0 --libs gio-2.0 --libs libsystemd-login` $(CDEBUGFLAGS) -lX11 -lXext -lXss -lm
+CFLAGS = `pkg-config --cflags dbus-1 --cflags glib-2.0 --cflags gio-2.0 --cflags systemd` -Wall -Wextra -Wwrite-strings $(CDEBUGFLAGS)
+LDFLAGS= `pkg-config --libs dbus-1 --libs glib-2.0 --libs gio-2.0 --cflags systemd` $(CDEBUGFLAGS) -lX11 -lXext -lXss -lm -lsystemd
INSTALL = /usr/bin/install -c
INSTALLDATA = /usr/bin/install -c -m 644