You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

kde.sh 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. #!/bin/sh
  2. set -e
  3. if [ -f ./debian/rules ]; then
  4. echo "Running debuild clean and delete the old debian/rules now. "
  5. echo "Please run bootstrap again!"
  6. [ -f ./debian/changelog ] && debuild -d clean
  7. rm -f debian/rules
  8. exit 1
  9. fi
  10. if [ -f VERSION ]; then
  11. . ./VERSION
  12. else
  13. echo "No VERSION-File, exit!"
  14. exit 1
  15. fi
  16. if [ -f FLAVOUR ]; then
  17. . ./FLAVOUR
  18. else
  19. echo "No FLAVOUR-File, exit!"
  20. exit 1
  21. fi
  22. # clean up obsolete stuff
  23. rm -f ./debian/*.install \
  24. ./debian/install \
  25. ./debian/*.links \
  26. ./debian/ĺinks \
  27. ./debian/*.postinst \
  28. ./debian/postinst \
  29. ./debian/*.postrm \
  30. ./debian/postrm \
  31. ./debian/*.prerm \
  32. ./debian/prerm \
  33. ./debian/*.preinst \
  34. ./debian/preinst
  35. [ -d ./debian ] || exit 1
  36. if [ ! -e ./debian/changelog ]; then
  37. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  38. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  39. -e "s/\@VERSION\@/${VERSION}/g" \
  40. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  41. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  42. templates/debian/changelog \
  43. > ./debian/changelog
  44. fi
  45. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  46. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  47. -e "s/\@VERSION\@/${VERSION}/g" \
  48. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  49. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  50. templates/debian/${FLAVOUR}-control \
  51. > ./debian/control
  52. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  53. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  54. -e "s/\@VERSION\@/${VERSION}/g" \
  55. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  56. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  57. templates/debian/rules \
  58. > ./debian/rules
  59. chmod 755 ./debian/rules
  60. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  61. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  62. -e "s/\@VERSION\@/${VERSION}/g" \
  63. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  64. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  65. templates/debian/source/options \
  66. > ./debian/source/options
  67. if [ "${FLAVOUR}" = 'grub-theme' ]; then
  68. rm -rf template
  69. cp -a templates/grub-theme/* .
  70. cp -f templates/grub-theme/Makefile .
  71. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  72. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  73. -e "s/\@VERSION\@/${VERSION}/g" \
  74. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  75. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  76. templates/debian/grub-theme.install \
  77. > ./debian/install
  78. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  79. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  80. -e "s/\@VERSION\@/${VERSION}/g" \
  81. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  82. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  83. templates/debian/grub-theme.postinst \
  84. > ./debian/postinst
  85. fi
  86. # if [ "${FLAVOUR}" = 'kde' ]; then
  87. # sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  88. # templates/debian/CODENAME_SAFE-kde.install \
  89. # > ./debian/kde.install
  90. # sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  91. # templates/debian/CODENAME_SAFE.install \
  92. # > ./debian/kde.install
  93. # sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  94. # templates/debian/CODENAME_SAFE-kde.postinst \
  95. # > ./debian/${NAME}.postinst
  96. # sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  97. # templates/debian/CODENAME_SAFE.postrm \
  98. # > ./debian/${NAME}.postrm
  99. # sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  100. # templates/debian/CODENAME_SAFE.links \
  101. # > ./debian/${NAME}.links
  102. # sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  103. # templates/ksplash/description.txt \
  104. # > ./ksplash/description.txt
  105. # sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  106. # templates/ksplash/Theme.rc \
  107. # > ./ksplash/Theme.rc
  108. #fi
  109. if [ "${FLAVOUR}" = 'lxqt' ]; then
  110. rm -r theme
  111. cp -a templates/lxqt/theme .
  112. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  113. templates/debian/lxqt.install \
  114. > ./debian/install
  115. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  116. templates/debian/lxqt.links \
  117. > ./debian/links
  118. fi
  119. if [ "${FLAVOUR}" = 'wallpapers' ]; then
  120. # svg copy
  121. rm -f ./svg/*.svg
  122. for i in templates/wallpapers/svg/*.svg; do
  123. BASENAME=$(basename $i)
  124. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  125. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  126. -e "s/\@VERSION\@/${VERSION}/g" \
  127. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  128. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  129. $i \
  130. > ./svg/${BASENAME}
  131. done
  132. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  133. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  134. -e "s/\@VERSION\@/${VERSION}/g" \
  135. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  136. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  137. templates/debian/wallpapers.install \
  138. > ./debian/install
  139. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  140. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  141. -e "s/\@VERSION\@/${VERSION}/g" \
  142. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  143. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  144. templates/debian/wallpapers.links \
  145. > ./debian/links
  146. cp templates/wallpapers/Makefile .
  147. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  148. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  149. -e "s/\@VERSION\@/${VERSION}/g" \
  150. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  151. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  152. templates/wallpapers/metadata.desktop \
  153. > ./metadata.desktop
  154. fi
  155. if [ "${FLAVOUR}" = 'xfce' ]; then
  156. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  157. templates/debian/xsplash.install \
  158. > ./debian/${NAME}-xsplash.install
  159. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  160. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  161. -e "s/\@VERSION\@/${VERSION}/g" \
  162. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  163. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  164. templates/xsplash/src/logo.svg \
  165. > ./src/logo.svg
  166. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  167. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  168. -e "s/\@VERSION\@/${VERSION}/g" \
  169. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  170. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  171. templates/xsplash/themerc \
  172. > ./src/themerc
  173. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  174. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  175. -e "s/\@VERSION\@/${VERSION}/g" \
  176. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  177. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  178. templates/xsplash/Makefile \
  179. > ./Makefile
  180. fi
  181. # write debian/*.install from templates
  182. for k in lightdm lxde xfce; do
  183. if [ -r ../templates/debian/siduction-art-${k}-CODENAME_SAFE.install ]; then
  184. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  185. ../templates/debian/siduction-art-${k}-CODENAME_SAFE.install \
  186. > ./debian/siduction-art-${k}-${NAME}.install
  187. else
  188. continue
  189. fi
  190. done
  191. # write debian/*.postinst from templates
  192. for k in lightdm lxde xfce; do
  193. if [ -r ../templates/debian/siduction-art-${k}-CODENAME_SAFE.postinst ]; then
  194. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  195. ../templates/debian/siduction-art-${k}-CODENAME_SAFE.postinst \
  196. > ./debian/siduction-art-${k}-${NAME}.postinst
  197. else
  198. continue
  199. fi
  200. done
  201. # write debian/*.postrm from templates
  202. for k in lightdm lxde wallpaper xfce xsplash; do
  203. if [ -r ../templates/debian/siduction-art-${k}-CODENAME_SAFE.postrm ]; then
  204. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  205. ../templates/debian/siduction-art-${k}-CODENAME_SAFE.postrm \
  206. > ./debian/siduction-art-${k}-${NAME}.postrm
  207. else
  208. continue
  209. fi
  210. done
  211. # create links
  212. for k in lightdm lxde wallpaper xfce xsplash; do
  213. if [ -r ../templates/debian/siduction-art-${k}-CODENAME_SAFE.links ]; then
  214. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  215. ../templates/debian/siduction-art-${k}-CODENAME_SAFE.links \
  216. > ./debian/siduction-art-${k}-${NAME}.links
  217. else
  218. continue
  219. fi
  220. done
  221. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  222. ../templates/artwork/splash-xfce/themerc \
  223. > ./artwork/splash-xfce/themerc
  224. ##
  225. ## Editable svg's support
  226. ##
  227. # Each branch has own background.jpg and elements.svg and those should be added
  228. # in branch svg dir
  229. # edit *svg.in's from templates and push them to ./artwork/svg
  230. for res in 1024x768 1280x1024 1600x1200 1920x1200 ; do
  231. sed -e "s/\@CODENAME_SAFE\@/${DISPLAY}/g" ../templates/artwork/svg/kde-splash-$res.svg \
  232. > ./artwork/svg/kde-splash-$res.svg
  233. done
  234. sed -e "s/\@CODENAME_SAFE\@/${DISPLAY}/g" ../templates/artwork/svg/xfce-splash-logo.svg \
  235. > ./artwork/svg/xfce-splash-logo.svg
  236. #xsplash
  237. cp -f ../svg/background.jpg src/