Merge pull request #4525 from DirectorX/xkblayout-state

New package: xkblayout-state-1
This commit is contained in:
Toyam Cox 2016-08-02 21:01:07 -04:00 committed by GitHub
commit dba57afd10
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,36 @@
diff --git Makefile Makefile
index c32ed6b..fb2e7a3 100644
--- Makefile
+++ Makefile
@@ -1,13 +1,22 @@
-all: xkblayout-state
+PROG=xkblayout-state
-XKeyboard.o: XKeyboard.cpp XKeyboard.h X11Exception.h
- g++ -c -Wall -O2 XKeyboard.cpp -o XKeyboard.o
+SRC = wrapper.cpp XKeyboard.cpp
+OBJS = ${SRC:.cpp=.o}
-wrapper.o: wrapper.cpp XKeyboard.h
- g++ -c -Wall -O2 wrapper.cpp -o wrapper.o
+all: ${PROG}
-xkblayout-state: XKeyboard.o wrapper.o
- g++ XKeyboard.o wrapper.o -lX11 -o xkblayout-state
+.cpp.o:
+ ${CXX} -c ${CXXFLAGS} $<
+
+${PROG}: ${OBJS}
+ ${CXX} -o $@ ${OBJS} ${LDFLAGS} -lX11
clean:
- rm -f xkblayout-state XKeyboard.o wrapper.o
+ rm -f ${PROG} ${OBJS}
+
+dist:
+ tar cfa xkblayout-state-v1b.tar.gz Makefile README.md wrapper.cpp X11Exception.h XKeyboard.cpp XKeyboard.h
+
+install:
+ install -Dm755 ${PROG} ${DESTDIR}/usr/bin/${PROG}
+

View file

@ -0,0 +1,13 @@
# Template file for 'xkblayout-state'
pkgname=xkblayout-state
version=1
revision=1
license="GPL-2"
homepage="https://github.com/nonpop/xkblayout-state"
makedepends="libX11-devel"
build_style=gnu-makefile
short_desc="A small command-line program to get/set the current keyboard layout"
maintainer="DirectorX <DirectorX@users.noreply.github.com>"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=16d2d8e4597dba7c185845fb2c7a603029f6c632438a2d771ce862b84c78cde5