[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Jailkit-dev] Makefile.in fixes
From: |
Andreas Schneider |
Subject: |
[Jailkit-dev] Makefile.in fixes |
Date: |
Fri, 07 Sep 2007 18:16:07 +0200 |
User-agent: |
Thunderbird 2.0.0.4 (X11/20070613) |
Hi,
I'm packaging jailkit for openSUSE in the Build Service [1]. You can
download it via the Software frontend [2].
I had to modify the Makefile.in files to get it packaged. There was no
DESTDIR variable to install it in a buildroot and you force user and
group id. This is not possible cause the build is normally running as a
user and the packaging system sets the appropriate rights then.
Attached is a patch.
-- andreas
[1] http://build.software.org/
[2] http://software.opensuse.org/search
--
http://www.cynapses.org/ - cybernetic synapses
Index: Makefile.in
===================================================================
--- Makefile.in.orig
+++ Makefile.in
@@ -58,12 +58,12 @@ distclean:
@cd man/ && $(MAKE) distclean
install:
- ${INSTALL} -d -m 755 ${iniprefix}
+ ${INSTALL} -d -m 755 ${DESTDIR}${iniprefix}
for file in ${INIFILES} ; do \
if [ -f ${iniprefix}$${file} ]; then \
- ${INSTALL} -o root -m 0644 ini/$${file}
${iniprefix}$${file}.dist ;\
+ ${INSTALL} -m 0644 ini/$${file}
${DESTDIR}${iniprefix}$${file}.dist ;\
else \
- ${INSTALL} -o root -m 0644 ini/$${file} ${iniprefix} ;\
+ ${INSTALL} -m 0644 ini/$${file} ${DESTDIR}${iniprefix}
;\
fi ;\
done
@cd src/ && $(MAKE) install
@@ -71,9 +71,11 @@ install:
@cd man/ && $(MAKE) install
# test if the jk_chrootsh is already in /etc/shells
# this previously had @echo but that fails on FreeBSD
- if ! grep ${prefix}/sbin/jk_chrootsh /etc/shells ; then \
- echo "appending ${prefix}/sbin/jk_chroots to /etc/shells";\
- echo ${prefix}/sbin/jk_chrootsh >> /etc/shells ;\
+ if test -w /etc/shells; then \
+ if ! grep ${prefix}/sbin/jk_chrootsh /etc/shells ; then \
+ echo "appending ${prefix}/sbin/jk_chroots to
/etc/shells";\
+ echo ${prefix}/sbin/jk_chrootsh >> /etc/shells ;\
+ fi \
fi
Index: man/Makefile.in
===================================================================
--- man/Makefile.in.orig
+++ man/Makefile.in
@@ -63,9 +63,9 @@ jailkit: ${OBJS}
all: jailkit
install: jailkit
- ${INSTALL} -d -m 755 ${prefix}/share/man/man8/
+ ${INSTALL} -d -m 755 ${DESTDIR}${prefix}/share/man/man8/
for file in ${OBJS} ; do \
- ${INSTALL} -g 0 -o root -m 0644 $${file}
${prefix}/share/man/man8/ ;\
+ ${INSTALL} -m 0644 $${file} ${DESTDIR}${prefix}/share/man/man8/
;\
done
uninstall:
Index: py/Makefile.in
===================================================================
--- py/Makefile.in.orig
+++ py/Makefile.in
@@ -68,17 +68,17 @@ jailkit: jk_lib.pyc jk_cp jk_init jk_che
all: jailkit
install: jailkit
- ${INSTALL} -d -m 755 ${prefix}/sbin
- ${INSTALL} -d -m 755 ${PYLIBDIR}
- ${INSTALL} -g 0 -o root -m 0644 jk_lib.py ${PYLIBDIR}/
- ${INSTALL} -g 0 -o root -m 0644 jk_lib.pyc ${PYLIBDIR}/
- ${INSTALL} -g 0 -o root -m 0755 jk_init ${prefix}/sbin
- ${INSTALL} -g 0 -o root -m 0755 jk_check ${prefix}/sbin
- ${INSTALL} -g 0 -o root -m 0755 jk_cp ${prefix}/sbin
- ${INSTALL} -g 0 -o root -m 0755 jk_addjailuser ${prefix}/sbin
- ${INSTALL} -g 0 -o root -m 0755 jk_jailuser ${prefix}/sbin
- ${INSTALL} -g 0 -o root -m 0755 jk_list ${prefix}/sbin
- ${INSTALL} -g 0 -o root -m 0755 jk_update ${prefix}/sbin
+ ${INSTALL} -d -m 755 ${DESTDIR}${prefix}/sbin
+ ${INSTALL} -d -m 755 ${DESTDIR}${PYLIBDIR}
+ ${INSTALL} -m 0644 jk_lib.py ${DESTDIR}${PYLIBDIR}/
+ ${INSTALL} -m 0644 jk_lib.pyc ${DESTDIR}${PYLIBDIR}/
+ ${INSTALL} -m 0755 jk_init ${DESTDIR}${prefix}/sbin
+ ${INSTALL} -m 0755 jk_check ${DESTDIR}${prefix}/sbin
+ ${INSTALL} -m 0755 jk_cp ${DESTDIR}${prefix}/sbin
+ ${INSTALL} -m 0755 jk_addjailuser ${DESTDIR}${prefix}/sbin
+ ${INSTALL} -m 0755 jk_jailuser ${DESTDIR}${prefix}/sbin
+ ${INSTALL} -m 0755 jk_list ${DESTDIR}${prefix}/sbin
+ ${INSTALL} -m 0755 jk_update ${DESTDIR}${prefix}/sbin
uninstall:
rm -f ${prefix}/sbin/jk_cp
Index: src/Makefile.in
===================================================================
--- src/Makefile.in.orig
+++ src/Makefile.in
@@ -78,15 +78,15 @@ distclean: clean
rm -f Makefile config.h
install: ${BINARIES}
- ${INSTALL} -d -m 755 ${prefix}
- ${INSTALL} -d -m 755 ${prefix}/sbin
- ${INSTALL} -g 0 -o 0 -s -m 0755 jk_socketd ${prefix}/sbin/
- ${INSTALL} -g 0 -o 0 -s -m 0755 jk_chrootlaunch ${prefix}/sbin/
- ${INSTALL} -g 0 -o 0 -s -m 0755 jk_lsh ${prefix}/sbin/
- ${INSTALL} -g 0 -o 0 -s -m 4755 jk_chrootsh ${prefix}/sbin/
- ${INSTALL} -g 0 -o 0 -s -m 4755 jk_uchroot ${prefix}/bin/
+ ${INSTALL} -d -m 755 ${DESTDIR}${prefix}
+ ${INSTALL} -d -m 755 ${DESTDIR}${prefix}/sbin
+ ${INSTALL} -m 0755 jk_socketd ${DESTDIR}${prefix}/sbin/
+ ${INSTALL} -m 0755 jk_chrootlaunch ${DESTDIR}${prefix}/sbin/
+ ${INSTALL} -m 0755 jk_lsh ${DESTDIR}${prefix}/sbin/
+ ${INSTALL} -m 4755 jk_chrootsh ${DESTDIR}${prefix}/sbin/
+ ${INSTALL} -m 4755 jk_uchroot ${DESTDIR}${prefix}/bin/
if [ ${HAVEPROCMAIL} -eq "1" ]; then \
- ${INSTALL} -g 0 -o root -s -m 4755 jk_procmailwrapper
${prefix}/sbin/ ;\
+ ${INSTALL} -m 4755 jk_procmailwrapper ${DESTDIR}${prefix}/sbin/
;\
fi
uninstall:
signature.asc
Description: OpenPGP digital signature
- [Jailkit-dev] Makefile.in fixes,
Andreas Schneider <=