Permalink
Browse files

If NOPERMS flag is passed to make install, do not apply permissions, …

…use flag in rpm build
  • Loading branch information...
simoncadman committed May 2, 2013
1 parent 6fc2472 commit b9bbe1b9659f9bfd6f6ec37dee9a8e97e6a9c51e
Showing with 9 additions and 2 deletions.
  1. +5 −1 Makefile.in
  2. +4 −1 packages/redhat/SPECS/cupscloudprint.spec
View
@@ -21,11 +21,15 @@ install: all
${INSTALL} ${srcdir}/testfiles/* ${prefix}/lib/cloudprint-cups/testfiles/
${INSTALL} ${srcdir}/oauth2client/*.py ${prefix}/lib/cloudprint-cups/oauth2client/
mkdir -p ${cupsbackend}
- ${INSTALL} -g `groups root | cut -d' ' -f1` -o root -m 700 ${srcdir}/backend.py ${cupsbackend}cloudprint
mkdir -p ${cupsmodel}
${INSTALL} ${srcdir}/cloudprint.ppd ${cupsmodel}CloudPrint.ppd
mkdir -p $(DESTDIR)/var/log/cups/
touch $(DESTDIR)/var/log/cups/cloudprint_log
+ifeq ($(NOPERMS),1)
+ ${INSTALL} ${srcdir}/backend.py ${cupsbackend}cloudprint
+else
+ ${INSTALL} -g `groups root | cut -d' ' -f1` -o root -m 700 ${srcdir}/backend.py ${cupsbackend}cloudprint
chown root:${cupsgroup} $(DESTDIR)/var/log/cups/cloudprint_log
chown -R root:${cupsgroup} ${prefix}/lib/cloudprint-cups/
chmod 660 $(DESTDIR)/var/log/cups/cloudprint_log
+endif
@@ -24,9 +24,12 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT NOPERMS=1
%post
+chown root:lp /var/log/cups/cloudprint_log
+chown -R root:lp /usr/lib/cloudprint-cups/
+chmod 660 /var/log/cups/cloudprint_log
/usr/lib/cloudprint-cups/upgrade.py
%files

0 comments on commit b9bbe1b

Please sign in to comment.