nixpkgs/pkgs/by-name/tc/tcb/fix-makefiles.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

53 lines
1.6 KiB
Diff

diff --git a/Make.defs b/Make.defs
index a961f7d..9e8d59b 100644
--- a/Make.defs
+++ b/Make.defs
@@ -19,7 +19,7 @@ LDFLAGS += $(DBGFLAG) -L../libs
PREFIX = /usr
SBINDIR = /sbin
-SLIBDIR = /lib
+SLIBDIR = $(PREFIX)/lib
INCLUDEDIR = $(PREFIX)/include
LIBDIR = $(PREFIX)/lib
LIBEXECDIR = $(PREFIX)/libexec
diff --git a/libs/Makefile b/libs/Makefile
index 0083b13..27238f6 100644
--- a/libs/Makefile
+++ b/libs/Makefile
@@ -7,7 +7,7 @@ LIBTCB_A = libtcb.a
LIB_MAP = libtcb.map
NSS_MAP = libnss_tcb.map
-all: $(LIBTCB_LONG) $(LIBNSS) $(LIBTCB_A)
+all: $(LIBTCB_LONG) $(LIBNSS)
$(LIBTCB_A): libtcb_a.o
ar -cr $@ $<
@@ -36,9 +36,8 @@ install:
$(MKDIR) -p -m 755 $(DESTDIR)$(LIBDIR)
$(INSTALL) -m $(SHLIBMODE) $(LIBTCB_LONG) $(DESTDIR)$(SLIBDIR)/
ln -sf $(LIBTCB_LONG) $(DESTDIR)$(SLIBDIR)/$(LIBTCB)
- ln -sf ../..$(SLIBDIR)/$(LIBTCB) $(DESTDIR)$(LIBDIR)/libtcb.so
+ ln -sf $(LIBTCB) $(DESTDIR)$(LIBDIR)/libtcb.so
$(INSTALL) -m $(SHLIBMODE) $(LIBNSS) $(DESTDIR)$(SLIBDIR)/
- $(INSTALL) -m 644 $(LIBTCB_A) $(DESTDIR)$(LIBDIR)/
clean:
rm -f *.o *~ $(LIBTCB)* libtcb.so $(LIBNSS) *.a
diff --git a/progs/Makefile b/progs/Makefile
index c3a6879..e24f74b 100644
--- a/progs/Makefile
+++ b/progs/Makefile
@@ -23,8 +23,8 @@ install-non-root: install-common
$(INSTALL) -m 700 $(CHKPWD) $(DESTDIR)$(LIBEXECDIR)/chkpwd/
install: install-common
- $(INSTALL) -d -o root -g chkpwd -m 710 $(DESTDIR)$(LIBEXECDIR)/chkpwd
- $(INSTALL) -m 2711 -o root -g shadow $(CHKPWD) \
+ $(INSTALL) -d $(DESTDIR)$(LIBEXECDIR)/chkpwd
+ $(INSTALL) $(CHKPWD) \
$(DESTDIR)$(LIBEXECDIR)/chkpwd/
install-common: