1 SHAREDIR
= /usr
/share
/pdk
/
2 VARDIR
= /var
/lib
/moblin-image-creator
8 # This target will do a cleanall and then reinstall
9 cleaninstall
: cleanall
install
12 runtests
: runbasictests
14 # Everytime we install the code we want the basic unit tests to run
15 install: basicinstall runbasictests
18 @echo
"Installing platform definitions..."
19 @
${MAKE} -C platforms
install
20 @echo
-n
"Installing moblin-image-creator..."
21 @mkdir
-p
${DESTDIR}/${VARDIR}
22 @mkdir
-p
${DESTDIR}/${VARDIR}/projects
23 @mkdir
-p
${DESTDIR}/${SHAREDIR}/default_config
24 @mkdir
-p
${DESTDIR}/${SHAREDIR}/lib
25 @mkdir
-p
${DESTDIR}/${SHAREDIR}/locale
26 @mkdir
-p
${DESTDIR}/${SHAREDIR}/utils
27 @head
-n
1 debian
/changelog
> ${DESTDIR}/${SHAREDIR}/version
28 @cp libs
/*.py
${DESTDIR}/${SHAREDIR}/lib
29 @cp gui
/*.py
${DESTDIR}/${SHAREDIR}/lib
30 @cp gui
/*.glade
${DESTDIR}/${SHAREDIR}
31 @cp gui
/*.png
${DESTDIR}/${SHAREDIR}
32 @cp gui
/newFeature
${DESTDIR}/${SHAREDIR}
33 @cp COPYING
${DESTDIR}/${SHAREDIR}/
34 @cp
-a gui
/pixmaps
/.
${DESTDIR}/${SHAREDIR}
35 @cp default_config
/defaults.cfg
${DESTDIR}/${SHAREDIR}/default_config
/
36 @mkdir
-p
${DESTDIR}/usr
/bin
37 @
rm -f
${DESTDIR}/usr
/sbin
/image-creator
38 @cp image-creator
${DESTDIR}/usr
/bin
/
39 @mkdir
-p
${DESTDIR}/etc
/bash_completion.d
/
40 @cp utils
/image-creator-completion.bash
${DESTDIR}/etc
/bash_completion.d
/
41 @mkdir
-p
${DESTDIR}/${SHAREDIR}/gnome
/help
/image-creator
/
42 @cp
-a help
/* ${DESTDIR}/${SHAREDIR}/gnome
/help
/image-creator
/
43 @cp utils
/*.py
${DESTDIR}/${SHAREDIR}/utils
/
44 @mkdir
-p
${DESTDIR}/usr
/share
/applications
/
45 sed
'{s/%%EXEC_CMD%%/gksu \/usr\/bin\/image-creator/}' image-creator.desktop.template
> ${DESTDIR}/usr
/share
/applications
/image-creator.desktop
49 @echo create the tarball...
50 cd ..
; cp
-a moblin-image-creator moblin-image-creator-
${VERSION}; tar zcpvf
/usr
/src
/rpm
/SOURCES
/moblin-image-creator-
${VERSION}.tgz moblin-image-creator-
${VERSION}/; rm -fR moblin-image-creator-
${VERSION}
51 rpmbuild
-bb moblin-image-creator.spec
53 # Cleans out the current directory cruft
55 @echo
-n
"Cleaning up working directory files..."
58 @find
-name \
*~
-exec
rm -f
{} \
;
59 @
${MAKE} -C platforms
clean
62 # Cleans out the installation target
64 @echo
-n
"Removing previously installed files..."
65 @
rm -rfv
${DESTDIR}/${VARDIR}/rootstraps
66 @
rm -rf
${DESTDIR}/${SHAREDIR}/gnome
67 @
rm -rf
${DESTDIR}/${SHAREDIR}/lib
68 @
rm -rf
${DESTDIR}/${SHAREDIR}/locale
69 @
rm -rf
${DESTDIR}/${SHAREDIR}/platforms
70 @
rm -f
${DESTDIR}/${SHAREDIR}/*.glade
71 @
rm -f
${DESTDIR}/usr
/bin
/image-creator
72 @
rm -f
${DESTDIR}/usr
/sbin
/image-creator
73 @
rm -f
${DESTDIR}/etc
/bash_completion.d
/image-creator-completion.bash
74 @
rm -rf
${DESTDIR}/${SHAREDIR}/utils
75 @
rm -f
${DESTDIR}/usr
/share
/applications
/image-creator.desktop
78 # Run the unit tests which run fairly quickly
80 @echo
"Running basic unit tests..."
81 unittest
/testMoblin_apt.py
82 unittest
/test_fsets.py
83 unittest
/testProject.py
85 @echo
"Basic unit tests completed"
87 # Run all of our tests, even the ones that take a long time to run
89 @echo
"Running unit tests that take a long time..."
90 unittest
/testInstallImage.py
93 @echo
"Uninstalling moblin-image-creator..."
94 @
rm -f
${DESTDIR}/${SHAREDIR}/*.png
95 @
rm -f
${DESTDIR}/${SHAREDIR}/*.xcf
96 @
rm -f
${DESTDIR}/${SHAREDIR}/*.xpm
97 @
rm -f
${DESTDIR}/${SHAREDIR}/README
98 @
rm -f
${DESTDIR}/${SHAREDIR}/COPYING
99 @
rm -f
${DESTDIR}/${SHAREDIR}/version
100 @find
${DESTDIR}/${SHAREDIR}/projects
-type f
-exec echo Project found
: {} \
;