-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Scott Hamilton
committed
Jul 4, 2020
1 parent
0c9df94
commit e361753
Showing
3 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, gnumake | ||
, dbus | ||
, pkg-config | ||
, libconfig | ||
, pcre | ||
, libdrm | ||
, xorg | ||
, libglvnd | ||
, linuxHeaders | ||
}: | ||
stdenv.mkDerivation rec { | ||
|
||
pname = "Compton"; | ||
version = "0.1_beta2"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "tryone144"; | ||
repo = "compton"; | ||
rev = "v${version}"; | ||
sha256 = "0v65viilhnd2xgvmdpzc1srxszcg8kj1vhi5gy9292j48w0s2fx1"; | ||
}; | ||
|
||
patches = [ ./dont-build-doc.patch ]; | ||
|
||
postPatch = '' | ||
substituteInPlace Makefile \ | ||
--replace "PREFIX ?= /usr" "PREFIX ?= $out" | ||
rm -rf man | ||
''; | ||
|
||
nativeBuildInputs = [ gnumake pkg-config ]; | ||
buildInputs = with xorg; map lib.getDev [ libX11 libXcomposite libXdamage libXrender libXext libXrandr libXinerama libconfig dbus libglvnd libdrm pcre ]; | ||
|
||
meta = with lib; { | ||
description = "Compositor for X11"; | ||
license = licenses.mit; | ||
homepage = "https://github.com/tryone144/compton"; | ||
maintainers = with maintainers; [ shamilton ]; | ||
platforms = platforms.linux; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
diff -ur a/Makefile b/Makefile | ||
--- a/Makefile 2013-10-21 16:17:01.000000000 +0200 | ||
+++ b/Makefile 2020-07-03 21:01:26.684818543 +0200 | ||
@@ -5,7 +5,6 @@ | ||
|
||
PREFIX ?= /usr | ||
BINDIR ?= $(PREFIX)/bin | ||
-MANDIR ?= $(PREFIX)/share/man/man1 | ||
APPDIR ?= $(PREFIX)/share/applications | ||
|
||
PACKAGES = x11 xcomposite xfixes xdamage xrender xext xrandr | ||
@@ -102,8 +101,6 @@ | ||
CFLAGS += -Wall | ||
|
||
BINS = compton bin/compton-trans | ||
-MANPAGES = man/compton.1 man/compton-trans.1 | ||
-MANPAGES_HTML = $(addsuffix .html,$(MANPAGES)) | ||
|
||
# === Recipes === | ||
.DEFAULT_GOAL := compton | ||
@@ -117,37 +114,19 @@ | ||
compton: $(OBJS) | ||
$(CC) $(CFG) $(CPPFLAGS) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS) | ||
|
||
-man/%.1: man/%.1.asciidoc | ||
- a2x --format manpage $< | ||
- | ||
-man/%.1.html: man/%.1.asciidoc | ||
- asciidoc $< | ||
- | ||
-docs: $(MANPAGES) $(MANPAGES_HTML) | ||
- | ||
-install: $(BINS) docs | ||
- @install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(MANDIR)" "$(DESTDIR)$(APPDIR)" | ||
+install: $(BINS) | ||
+ @install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(APPDIR)" | ||
@install -m755 $(BINS) "$(DESTDIR)$(BINDIR)"/ | ||
- @install -m644 $(MANPAGES) "$(DESTDIR)$(MANDIR)"/ | ||
@install -m644 compton.desktop "$(DESTDIR)$(APPDIR)"/ | ||
-ifneq "$(DOCDIR)" "" | ||
- @install -d "$(DESTDIR)$(DOCDIR)" | ||
- @install -m644 README.md compton.sample.conf "$(DESTDIR)$(DOCDIR)"/ | ||
- @install -m755 dbus-examples/cdbus-driver.sh "$(DESTDIR)$(DOCDIR)"/ | ||
-endif | ||
|
||
uninstall: | ||
@rm -f "$(DESTDIR)$(BINDIR)/compton" "$(DESTDIR)$(BINDIR)/compton-trans" | ||
- @rm -f $(addprefix "$(DESTDIR)$(MANDIR)"/, compton.1 compton-trans.1) | ||
@rm -f "$(DESTDIR)$(APPDIR)/compton.desktop" | ||
-ifneq "$(DOCDIR)" "" | ||
- @rm -f $(addprefix "$(DESTDIR)$(DOCDIR)"/, README.md compton.sample.conf cdbus-driver.sh) | ||
-endif | ||
|
||
clean: | ||
- @rm -f $(OBJS) compton $(MANPAGES) $(MANPAGES_HTML) .clang_complete | ||
+ @rm -f $(OBJS) compton .clang_complete | ||
|
||
version: | ||
@echo "$(COMPTON_VERSION)" | ||
|
||
-.PHONY: uninstall clean docs version | ||
+.PHONY: uninstall clean version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters