- rm -rf /tmp/${SNAPSHOTDIR}
- mkdir /tmp/${SNAPSHOTDIR}
- cp -a * /tmp/${SNAPSHOTDIR}
- (cd /tmp/${SNAPSHOTDIR} ; \
- make distclean ; \
- find . -type d -name CVS | xargs rm -rf ; \
- find . -type f -name '.*.swp' | xargs rm -f ; \
- find . -type f -name '.cvsignore' | xargs rm -f ; \
- cd .. ; \
- tar czvf ${SNAPSHOTDIR}.tar.gz ${SNAPSHOTDIR} ; \
- tar cIvf ${SNAPSHOTDIR}.tar.bz2 ${SNAPSHOTDIR} )
- rm -rf /tmp/${SNAPSHOTDIR}
- mv /tmp/${SNAPSHOTDIR}.tar.gz ..
- mv /tmp/${SNAPSHOTDIR}.tar.bz2 ..
- @echo "Sources are in ../${SNAPSHOTDIR}.tar.[gz,bz2]"
+ rm -rf /tmp/vlc-@VLC_VERSION@ /tmp/vlc-@VLC_VERSION@nocss
+ # copy archive in /tmp
+ find -type d | while read i ; \
+ do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
+ done
+ find debian -mindepth 1 -type d | grep -v CVS | while read i ; \
+ do rmdir $$i ; \
+ done
+ # CVS entries
+ find . -type f | grep CVS | while read i ; \
+ do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
+ done
+ # .c .h .in .cpp
+ find include src plugins -type f -name '*.[chi]*' | while read i ; \
+ do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
+ done
+ # copy misc files
+ cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
+ Makefile.in Makefile.dep configure configure.in install-sh \
+ config.sub config.guess todo.pl \
+ /tmp/vlc-@VLC_VERSION@/
+ for file in control vlc-gnome.menu vlc.copyright vlc.docs changelog \
+ rules vlc.1 vlc.dirs vlc.menu ; do \
+ cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
+ for file in default8x16.psf default8x9.psf gvlc.png vlc.png ; do \
+ cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
+
+ # build css-enabled archives
+ (cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
+ bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
+ > vlc-@VLC_VERSION@.tar.bz2 ; \
+ gzip -f -9 vlc-@VLC_VERSION@.tar )
+ mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
+
+ # removing CSS stuff
+ find /tmp/vlc-@VLC_VERSION@ -type f -name '*css*' | xargs rm -f
+ for x in Makefile.in src/input/input_dvd.c src/input/input_dvd.h ; do \
+ rm -f /tmp/vlc-@VLC_VERSION@/$$x ; \
+ perl -ne 'if (/^#e(lse|ndif)/) { $$i=0; } \
+ if (/^#if.*DVD/) { $$i=1; print "#if 0\n"; } \
+ elsif (!$$i || /^#/) { print $$_; }' \
+ < $$x | grep -vi css >| /tmp/vlc-@VLC_VERSION@/$$x ; \
+ done
+ rm -f /tmp/vlc-@VLC_VERSION@/debian/changelog
+ sed 's/\(^vlc ([^-]*\)-/\1nocss-/' < debian/changelog \
+ > /tmp/vlc-@VLC_VERSION@/debian/changelog
+
+ # build nocss archives
+ (cd /tmp ; mv vlc-@VLC_VERSION@ vlc-@VLC_VERSION@nocss ; \
+ tar cf vlc-@VLC_VERSION@nocss.tar vlc-@VLC_VERSION@nocss ; \
+ bzip2 -f -9 < vlc-@VLC_VERSION@nocss.tar \
+ > vlc-@VLC_VERSION@nocss.tar.bz2 ; \
+ gzip -f -9 vlc-@VLC_VERSION@nocss.tar )
+ mv /tmp/vlc-@VLC_VERSION@nocss.tar.gz \
+ /tmp/vlc-@VLC_VERSION@nocss.tar.bz2 ..
+
+ # clean up
+ rm -rf /tmp/vlc-@VLC_VERSION@nocss