summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2002-06-02 07:11:32 +0000
committerYves Duret <yduret@mandriva.com>2002-06-02 07:11:32 +0000
commit5c4349b72d4cbc3d0713f33fa9a7953e24e73dc9 (patch)
treec75a965bf630c3fb92f1e41fe7c13d31a1ca9527
parent9085b6a709c8bbfeb1ee5a1adf38c231ae50a39a (diff)
downloadcontrol-center-5c4349b72d4cbc3d0713f33fa9a7953e24e73dc9.tar
control-center-5c4349b72d4cbc3d0713f33fa9a7953e24e73dc9.tar.gz
control-center-5c4349b72d4cbc3d0713f33fa9a7953e24e73dc9.tar.bz2
control-center-5c4349b72d4cbc3d0713f33fa9a7953e24e73dc9.tar.xz
control-center-5c4349b72d4cbc3d0713f33fa9a7953e24e73dc9.zip
Makefile: use DESTDIR
spec: adaptation
-rw-r--r--Makefile18
-rw-r--r--drakconf.spec54
2 files changed, 26 insertions, 46 deletions
diff --git a/Makefile b/Makefile
index 0e4ad8b5..556bd05b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ NAME = drakconf
SUBDIRS = po pixmaps
localedir = $(prefix)/usr/share/locale
RPM=$(HOME)/rpm
-mcc_dir = $(RPM_BUILD_ROOT)/usr/share/mcc
+mcc_dir = $(DESTDIR)/usr/share/mcc
override CFLAGS += -DPACKAGE=\"$(NAME)\" -DLOCALEDIR=\"$(localedir)\"
@@ -20,14 +20,14 @@ clean:
install: all
$(MAKE) -C po $@
- install -d $(RPM_BUILD_ROOT)/usr/{X11R6/bin/,share/{icons,doc/$(NAME)-$(VERSION)}}
- install -d $(RPM_BUILD_ROOT)/usr/sbin
- install -d $(RPM_BUILD_ROOT)/$(mcc_dir)
- install -m755 $(NAME) $(RPM_BUILD_ROOT)/usr/X11R6/bin/
- install -m755 clock.pl $(RPM_BUILD_ROOT)/usr/sbin/
- install -m755 menus_launcher.pl $(RPM_BUILD_ROOT)/usr/sbin/
- install -m755 print_launcher.pl $(RPM_BUILD_ROOT)/usr/sbin/
- install -m644 COPYING $(RPM_BUILD_ROOT)/usr/share/doc/$(NAME)-$(VERSION)/
+ install -d $(DESTDIR)/usr/{bin/,share/{icons,doc/$(NAME)-$(VERSION)}}
+ install -d $(DESTDIR)/usr/sbin
+ install -d $(DESTDIR)/$(mcc_dir)
+ install -m755 $(NAME) $(DESTDIR)/usr/bin/
+ install -m755 clock.pl $(DESTDIR)/usr/sbin/
+ install -m755 menus_launcher.pl $(DESTDIR)/usr/sbin/
+ install -m755 print_launcher.pl $(DESTDIR)/usr/sbin/
+ install -m644 COPYING $(DESTDIR)/usr/share/doc/$(NAME)-$(VERSION)/
for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
dis: clean
diff --git a/drakconf.spec b/drakconf.spec
index 7d839105..a3561210 100644
--- a/drakconf.spec
+++ b/drakconf.spec
@@ -47,37 +47,22 @@ Center : kde and gnome themes.
%build
%install
-rm -rf $RPM_BUILD_ROOT
-make prefix=$RPM_BUILD_ROOT install
-
-mv ${RPM_BUILD_ROOT}%{_prefix}/X11R6/bin/drakconf \
- ${RPM_BUILD_ROOT}%{_prefix}/X11R6/bin/drakconf.real
-ln -sf %{_bindir}/consolehelper ${RPM_BUILD_ROOT}%{_prefix}/X11R6/bin/drakconf
-ln -sf %{_bindir}/consolehelper ${RPM_BUILD_ROOT}%{_prefix}/X11R6/bin/DrakConf # for compatiblity
-ln -sf %{_bindir}/consolehelper ${RPM_BUILD_ROOT}%{_prefix}/X11R6/bin/mcc
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{pam.d,security/console.apps}
-cp pam.drakconf $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/drakconf
-cp pam.drakconf $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/DrakConf
-cp pam.drakconf $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/mcc
-cp apps.drakconf $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/drakconf
-cp apps.drakconf $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/DrakConf
-cp apps.drakconf $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/mcc
+%makeinstall_std
#install lang
%{find_lang} %{name}
#install menu
-mkdir -p $RPM_BUILD_ROOT%{_menudir}
+mkdir -p %buildroor/%_menudir
cat > $RPM_BUILD_ROOT%{_menudir}/drakconf << EOF
-?package(%{name}): needs="x11" icon="drakconf.png" section="Configuration/Other" title="Mandrake Control Center" longtitle="System configuration tool" command="/usr/X11R6/bin/drakconf"
+?package(%{name}): needs="x11" icon="drakconf.png" section="Configuration/Other" title="Mandrake Control Center" longtitle="System configuration tool" command="%_bindir/%name"
EOF
#install menu icon
-mkdir -p $RPM_BUILD_ROOT%{_miconsdir}
-mkdir -p $RPM_BUILD_ROOT%{_liconsdir}
-bzcat %{SOURCE1} > $RPM_BUILD_ROOT%{_miconsdir}/drakconf.png
-bzcat %{SOURCE2} > $RPM_BUILD_ROOT%{_iconsdir}/drakconf.png
-bzcat %{SOURCE3} > $RPM_BUILD_ROOT%{_liconsdir}/drakconf.png
+mkdir -p %buildroot/{%_miconsdir,%_liconsdir}
+bzcat %{SOURCE1} > %buildroot/%_miconsdir/drakconf.png
+bzcat %{SOURCE2} > %buildroot/%_iconsdir/drakconf.png
+bzcat %{SOURCE3} > %buildroot/%_liconsdir/drakconf.png
%post
%{update_menus}
@@ -91,29 +76,24 @@ rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING
-%{_prefix}/X11R6/bin/*
-%{_menudir}/drakconf
-%{_miconsdir}/*.png
-%{_iconsdir}/*.png
-%{_liconsdir}/*.png
-%{_sbindir}/*
-%{_datadir}/mcc/default
-%config(noreplace) %{_sysconfdir}/pam.d/drakconf
-%config(noreplace) %{_sysconfdir}/pam.d/DrakConf
-%config(noreplace) %{_sysconfdir}/pam.d/mcc
-%config(noreplace) %{_sysconfdir}/security/console.apps/drakconf
-%config(noreplace) %{_sysconfdir}/security/console.apps/DrakConf
-%config(noreplace) %{_sysconfdir}/security/console.apps/mcc
+%_bindir/*
+%_sbindir/*
+%_menudir/drakconf
+%_miconsdir/*.png
+%_iconsdir/*.png
+%_liconsdir/*.png
+%_datadir/mcc/default
%files themes
%defattr(-,root,root)
%doc COPYING
-%{_datadir}/mcc/gnome
-%{_datadir}/mcc/kde
+%_datadir/mcc/gnome
+%_datadir/mcc/kde
%changelog
- requires clean up.
- new versioning scheme.
+- remove consolehelper dependencies. interactive is here for that.
* Fri Mar 15 2002 dam's <damien@mandrakesoft.com> 0.96-16mdk
- removed broken drakxtv