nixpkgs/pkgs/by-name/af/afio/0001-makefile-fix-installation.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
1.2 KiB
Diff

From 428c6e0eb604b63a67fda6af445c10c8ae3c1826 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg@phi-gamma.net>
Date: Sun, 27 Jan 2019 21:37:13 +0100
Subject: [PATCH] makefile: fix installation
- comment hard-coded $(CC)
- avoid full paths during install
- set proper permissions
---
Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 9268c6f..0797579 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ MW=-Wformat -Werror=format-security -Wall
CFLAGS1 = -Wall -Wstrict-prototypes -s -O2 -fomit-frame-pointer -Wno-unused-result $(LARGEFILEFLAGS) $(MW)
-CC=gcc
+#CC=gcc
# also using contents of usin CPPFLAGS, CFLAGS, LDFLAGS out of environment
# variables, if they exist
@@ -94,9 +94,14 @@ clean:
rm -f regtest/statsize regtest/statsize64
cd regtest; /bin/sh regtest.clean
+ifndef DESTDIR
+install:
+ $(error Please specify install prefix as $$DESTDIR)
+else
install: afio
- cp afio /usr/local/bin
- cp afio.1 /usr/share/man/man1
+ install -Dm755 afio $(DESTDIR)/bin/afio
+ install -Dm644 afio.1 $(DESTDIR)/share/man/man1/afio.1
+endif
# generate default list of -E extensions from manpage
# note: on sun, I had to change awk command below to nawk or gawk
--
2.18.1