File LConf-buildroot.patch of Package lconf

Index: LConf-1.2/Makefile.in
===================================================================
--- LConf-1.2.orig/Makefile.in
+++ LConf-1.2/Makefile.in
@@ -58,42 +58,36 @@ info:
 	@echo ""
 	
 install:
-	if [ `id -u` != 0 ]; then \
-		echo ""; \
-		echo "You're not root! Please run installer as root..."; \
-		exit 1; \
-	fi
-	
 	# create prefix dir
-	if [ ! -d $(PREFIX) ]; then install -d -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 755 $(PREFIX); fi
+	if [ ! -d $(DESTDIR)$(PREFIX) ]; then install -d -m 755 $(DESTDIR)$(PREFIX); fi
 	# create lib dir
-	if [ ! -d $(PREFIX)/lib ]; then install -d -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 755 $(PREFIX)/lib; fi
+	if [ ! -d $(DESTDIR)$(PREFIX)/lib ]; then install -d -m 755 $(DESTDIR)$(PREFIX)/lib; fi
 	# create etc dir
-	if [ ! -d $(PREFIX)/etc ]; then install -d -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 755 $(PREFIX)/etc; fi
+	if [ ! -d $(DESTDIR)$(PREFIX)/etc ]; then install -d -m 755 $(DESTDIR)$(PREFIX)/etc; fi
 	# create var dir
-	if [ ! -d $(PREFIX)/var ]; then install -d -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 755 $(PREFIX)/var; fi
+	if [ ! -d $(DESTDIR)$(PREFIX)/var ]; then install -d -m 755 $(DESTDIR)$(PREFIX)/var; fi
 	# create tmp dir
-	if [ ! -d $(PREFIX)/tmp ]; then install -d -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 755 $(PREFIX)/tmp; fi
+	if [ ! -d $(DESTDIR)$(PREFIX)/tmp ]; then install -d -m 755 $(DESTDIR)$(PREFIX)/tmp; fi
 	# create contrib dir
-	if [ ! -d contrib ]; then install -d -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 755 contrib; fi
+	if [ ! -d contrib ]; then install -d -m 755 contrib; fi
 	
 	# generate and install files
 		# $PREFIX
 			# LConfExport.pl
 				cat src/LConfExport.pl.in | sed -e "s/@PREFIX@/$(PREFIX_QUOTED)/g" > src/LConfExport.pl
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/LConfExport.pl $(PREFIX)/
+				install -m 750 src/LConfExport.pl $(DESTDIR)$(PREFIX)/
 			
 			# LConfImport.pl
 				cat src/LConfImport.pl.in | sed -e "s/@PREFIX@/$(PREFIX_QUOTED)/g" > src/LConfImport.pl
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/LConfImport.pl $(PREFIX)/
+				install -m 750 src/LConfImport.pl $(DESTDIR)$(PREFIX)/
 			
 			# LConfSlaveExport.pl
 				cat src/LConfSlaveExport.pl.in | sed -e "s/@PREFIX@/$(PREFIX_QUOTED)/g" > src/LConfSlaveExport.pl
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/LConfSlaveExport.pl $(PREFIX)/
+				install -m 750 src/LConfSlaveExport.pl $(DESTDIR)$(PREFIX)/
 			
 			# LConfSlaveSync.pl
 				cat src/LConfSlaveSync.pl.in | sed -e "s/@PREFIX@/$(PREFIX_QUOTED)/g" > src/LConfSlaveSync.pl
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/LConfSlaveSync.pl $(PREFIX)/
+				install -m 750 src/LConfSlaveSync.pl $(DESTDIR)$(PREFIX)/
 				
 		# $PREFIX/etc
 			# config.pm
@@ -104,42 +98,42 @@ install:
 				cat src/config.pm.4 | sed -e "s/@LDAP_BIND_PASSWORD@/$(LDAP_BIND_PASSWORD)/g" > src/config.pm.5
 				cat src/config.pm.5 | sed -e "s/@LCONF_CLI_USER@/$(LCONF_CLI_USER)/g" > src/config.pm.6
 				cat src/config.pm.6 | sed -e "s/@PREFIX@/$(PREFIX_QUOTED)/g" > src/config.pm
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/config.pm $(PREFIX)/etc/
+				install -m 750 src/config.pm $(DESTDIR)$(PREFIX)/etc/
 				
 			# default-templates.cfg.in
 				cat src/default-templates.cfg.in > src/default-templates.cfg
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/default-templates.cfg $(PREFIX)/etc/
+				install -m 750 src/default-templates.cfg $(DESTDIR)$(PREFIX)/etc/
 			
 		# $PREFIX/lib
 			# misc.pm
 				cat src/misc.pm.in > src/misc.pm
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/misc.pm $(PREFIX)/lib/
+				install -m 750 src/misc.pm $(DESTDIR)$(PREFIX)/lib/
 			
 			# ldap.pm
 				cat src/ldap.pm.in > src/ldap.pm
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/ldap.pm $(PREFIX)/lib/
+				install -m 750 src/ldap.pm $(DESTDIR)$(PREFIX)/lib/
 			
 			# generate.pm
 				cat src/generate.pm.in > src/generate.pm
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/generate.pm $(PREFIX)/lib/
+				install -m 750 src/generate.pm $(DESTDIR)$(PREFIX)/lib/
 				
 		# $PREFIX/contrib
 			# create_lconf-web-dn-mid.pl
 				cat src/create_lconf-web-dn-mid.pl.in | sed -e "s/@LDAP_PREFIX@/$(LDAP_PREFIX)/g" > src/create_lconf-web-dn-mid.pl
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/create_lconf-web-dn-mid.pl contrib/
+				install -m 750 src/create_lconf-web-dn-mid.pl contrib/
 				
 			# lconf-slavesync
 				cat src/lconf-slavesync.in > src/lconf-slavesync
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/lconf-slavesync contrib/
+				install -m 750 src/lconf-slavesync contrib/
 				
 			# lconf_deploy.sh
 				cat src/lconf_deploy.sh.in > src/lconf_deploy.sh
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/lconf_deploy.sh contrib/
+				install -m 750 src/lconf_deploy.sh contrib/
 				
 		# $PREFIX/dev/test
 			# test.pl
 				cat src/test.pl.in | sed -e "s/@PREFIX@/$(PREFIX_QUOTED)/g" > src/test.pl
-				install -o $(LCONF_CLI_USER) -g $(LCONF_CLI_GROUP) -m 750 src/test.pl dev/test/
+				install -m 750 src/test.pl dev/test/
 				
 		# LDAP schema and base.ldif
 			# netways.schema
openSUSE Build Service is sponsored by