-install -d $RPM_BUILD_ROOT/%{python_sitearch}/monitor
-install -d -D -m 755 monitor $RPM_BUILD_ROOT/%{python_sitearch}/monitor
-# TODO: need a much better way to do this.
-rsync -a monitor/ $RPM_BUILD_ROOT/%{python_sitearch}/monitor/
-#for file in __init__.py database.py config.py ; do
-# install -D -m 644 monitor/$file $RPM_BUILD_ROOT/%{python_sitearch}/monitor/$file
-#done
-rsync -a pcucontrol/ $RPM_BUILD_ROOT/%{python_sitearch}/pcucontrol/
+# install monitor python package
+rsync -a --exclude .svn ./monitor/ $RPM_BUILD_ROOT/%{python_sitearch}/monitor/
+
+# and pcucontrol
+rsync -a --exclude .svn ./pcucontrol/ $RPM_BUILD_ROOT/%{python_sitearch}/pcucontrol/
+
+# install third-party module to site-packages