From 2fc37c51eb672af240b8b0c98da5dfac99ba1522 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Fri, 12 Feb 2021 10:28:22 -0500 Subject: Update Makefiles --- Makefile | 9 +++++++++ adduser/Makefile | 24 ++++++++++++++++++++---- adduser/Makefile.depend | 11 ----------- pw/Makefile | 49 ++++++++++++++++++++++++++++++++++++++++++------- pw/ent.xml | 11 +++++++++++ 5 files changed, 82 insertions(+), 22 deletions(-) create mode 100644 Makefile delete mode 100644 adduser/Makefile.depend create mode 100644 pw/ent.xml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..de21416 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +TOPTARGETS := all clean install +SUBDIRS := adduser pw + +$(TOPTARGETS): $(SUBDIRS) + +$(SUBDIRS): + $(MAKE) -C $@ $(MAKECMDGOALS) + +.PHONY: $(TOPTARGETS) $(SUBDIRS) diff --git a/adduser/Makefile b/adduser/Makefile index 0ca2dae..7d67923 100644 --- a/adduser/Makefile +++ b/adduser/Makefile @@ -1,6 +1,22 @@ -# $FreeBSD$ +GINSTALL ?= install +PREFIX ?= /usr +DESTDIR ?= -SCRIPTS=adduser.sh rmuser.sh -MAN= adduser.conf.5 adduser.8 rmuser.8 +all: + @echo "Nothing to build" -.include +clean: + @echo "Nothing to clean" + +install: install-adduser install-rmuser + +install-adduser: adduser.sh adduser.8 adduser.conf.5 + $(GINSTALL) -Dm755 adduser.sh $(DESTDIR)/$(PREFIX)/sbin/adduser + $(GINSTALL) -Dm644 adduser.8 $(DESTDIR)/$(PREFIX)/share/man/man8/adduser.8 + $(GINSTALL) -Dm644 adduser.conf.5 $(DESTDIR)/$(PREFIX)/share/man/man5/adduser.conf.5 + +install-rmuser: rmuser.sh rmuser.8 + $(GINSTALL) -Dm755 rmuser.sh $(DESTDIR)/$(PREFIX)/sbin/rmuser + $(GINSTALL) -Dm644 rmuser.8 $(DESTDIR)/$(PREFIX)/share/man/man8/rmuser.8 + +.PHONY: all install install-adduser install-rmuser clean diff --git a/adduser/Makefile.depend b/adduser/Makefile.depend deleted file mode 100644 index f80275d..0000000 --- a/adduser/Makefile.depend +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/pw/Makefile b/pw/Makefile index 2db9f2f..ec70262 100644 --- a/pw/Makefile +++ b/pw/Makefile @@ -2,19 +2,54 @@ CC ?= aarch64-apple-darwin-clang STRIP ?= aarch64-apple-darwin-strip LDID ?= ldid CFLAGS ?= -arch arm64 -isysroot /home/cameron/Documents/SDK/iPhoneOS14.3.sdk -miphoneos-version-min=13.0 -INSTALL ?= install -FAKEROOT ?= fakeroot +GINSTALL ?= install PREFIX ?= /usr -DESTDIR ?= +DESTDIR ?= -DEB_MAINTAINER ?= Cameron Katri -DEB_ARCH ?= iphoneos-arm +SRC := pw_utils.c \ + pw_user.c \ + pw_conf.c \ + bitmap.c \ + psdate.c \ + pw_nis.c \ + reallocarray.c \ + pw.c \ + grupd.c \ + pwupd.c \ + pw_group.c \ + rm_r.c \ + pw_log.c \ + strtounum.c \ + pw_vpw.c \ + cpdir.c \ + strtonum.c + +SBUFSRC := sbuf/subr_sbuf.c \ + sbuf/subr_prf.c + +LIBUTILSRC := libutil/_secure_path.c \ + libutil/gr_util.c \ + libutil/flopen.c \ + libutil/pw_util.c \ + libutil/pw_scan.c \ + libutil/login_cap.c \ + libutil/login_crypt.c all: pw -pw: - $(CC) $(CFLAGS) -o pw -I. -Isbuf -Ilibutil *.c sbuf/*.c libutil/*.c +install: install-pw + +pw: $(SRC) $(LIBUTILSRC) $(SBUFSRC) ent.xml + $(CC) $(CFLAGS) -o pw -I. -Isbuf -Ilibutil $(SRC) $(LIBUTILSRC) $(SBUFSRC) $(STRIP) pw + $(LDID) -Sent.xml pw + +install-pw: pw pw.8 pw.conf.5 + $(GINSTALL) -Dm755 pw $(DESTDIR)/$(PREFIX)/sbin/pw + $(GINSTALL) -Dm644 pw.8 $(DESTDIR)/$(PREFIX)/share/man/man8/pw.8 + $(GINSTALL) -Dm644 pw.conf.5 $(DESTDIR)/$(PREFIX)/share/man/man5/pw.conf.5 clean: rm -f pw + +.PHONY: all install install-pw clean diff --git a/pw/ent.xml b/pw/ent.xml new file mode 100644 index 0000000..8a59f9f --- /dev/null +++ b/pw/ent.xml @@ -0,0 +1,11 @@ + + + + platform-application + + com.apple.private.security.no-container + + com.apple.private.skip-library-validation + + + -- cgit v1.2.3-56-ge451