| 1 | #
|
|---|
| 2 | # Makefile for installing nuvexport
|
|---|
| 3 | #
|
|---|
| 4 |
|
|---|
| 5 | BINS = nuvexport nuvinfo
|
|---|
| 6 |
|
|---|
| 7 | CONF = nuvexportrc
|
|---|
| 8 |
|
|---|
| 9 | EXPORT_MODULES = export/generic.pm \
|
|---|
| 10 | export/ffmpeg.pm \
|
|---|
| 11 | export/transcode.pm \
|
|---|
| 12 | export/mencoder.pm \
|
|---|
| 13 | export/NUV_SQL.pm \
|
|---|
| 14 | export/transcode/DVCD.pm \
|
|---|
| 15 | export/transcode/DVD.pm \
|
|---|
| 16 | export/transcode/SVCD.pm \
|
|---|
| 17 | export/transcode/VCD.pm \
|
|---|
| 18 | export/transcode/XviD.pm \
|
|---|
| 19 | export/ffmpeg/XviD.pm \
|
|---|
| 20 | export/ffmpeg/DivX.pm \
|
|---|
| 21 | export/ffmpeg/MP3.pm \
|
|---|
| 22 | export/ffmpeg/ASF.pm \
|
|---|
| 23 | export/ffmpeg/SVCD.pm \
|
|---|
| 24 | export/ffmpeg/DVCD.pm \
|
|---|
| 25 | export/ffmpeg/DVD.pm \
|
|---|
| 26 | export/ffmpeg/VCD.pm \
|
|---|
| 27 | export/ffmpeg/PSP.pm \
|
|---|
| 28 | export/ffmpeg/MP4.pm \
|
|---|
| 29 | export/mencoder/XviD.pm \
|
|---|
| 30 | export/mencoder/H264.pm
|
|---|
| 31 | MODULE_SUBDIRS = transcode \
|
|---|
| 32 | ffmpeg \
|
|---|
| 33 | mencoder
|
|---|
| 34 | MYTHTV_MODULES = mythtv/nuvinfo.pm \
|
|---|
| 35 | mythtv/recordings.pm
|
|---|
| 36 | NUVEXPORT_MODULES = nuv_export/help.pm \
|
|---|
| 37 | nuv_export/shared_utils.pm \
|
|---|
| 38 | nuv_export/task.pm \
|
|---|
| 39 | nuv_export/cli.pm \
|
|---|
| 40 | nuv_export/ui.pm
|
|---|
| 41 | MODULES = ${EXPORT_MODULES} ${MYTHTV_MODULES} ${NUVEXPORT_MODULES}
|
|---|
| 42 |
|
|---|
| 43 | NUVEXPORT_LINKS = divx dvcd dvd mp3 nuvsql svcd vcd asf xvid
|
|---|
| 44 |
|
|---|
| 45 | OWNER =
|
|---|
| 46 |
|
|---|
| 47 | INSTALL = /usr/bin/install
|
|---|
| 48 |
|
|---|
| 49 | prefix=/usr/local
|
|---|
| 50 | bindir=${prefix}/bin
|
|---|
| 51 | datadir=${prefix}/share
|
|---|
| 52 | sysconfdir=/etc
|
|---|
| 53 |
|
|---|
| 54 | MODDIR=${datadir}/nuvexport
|
|---|
| 55 |
|
|---|
| 56 | default:
|
|---|
| 57 | @echo "Use \"make install\" to install the new version and \"make uninstall\" to remove this version"
|
|---|
| 58 |
|
|---|
| 59 | install:
|
|---|
| 60 | # First the binaries
|
|---|
| 61 | @for i in ${BINS} ; do \
|
|---|
| 62 | ${INSTALL} -Dv ${OWNER} -m 0755 $$i ${bindir}/$$i; \
|
|---|
| 63 | done
|
|---|
| 64 | # Then the config file(s)
|
|---|
| 65 | @for i in ${CONF} ; do \
|
|---|
| 66 | if [ -e "${sysconfdir}"/"$$i" ]; then \
|
|---|
| 67 | ${INSTALL} -Dv ${OWNER} -m 0755 $$i ${sysconfdir}/$$i.dist; \
|
|---|
| 68 | else \
|
|---|
| 69 | ${INSTALL} -Dv ${OWNER} -m 0755 $$i ${sysconfdir}/$$i; \
|
|---|
| 70 | fi \
|
|---|
| 71 | done
|
|---|
| 72 | # Install the mode symlinks
|
|---|
| 73 | @for i in ${NUVEXPORT_LINKS} ; do \
|
|---|
| 74 | ln -fs nuvexport ${bindir}/nuvexport-$$i; \
|
|---|
| 75 | done
|
|---|
| 76 | # Install the modules
|
|---|
| 77 | @for i in ${MODULES} ; do \
|
|---|
| 78 | ${INSTALL} -Dv ${OWNER} -m 0755 $$i ${MODDIR}/$$i; \
|
|---|
| 79 | done
|
|---|
| 80 |
|
|---|
| 81 | uninstall:
|
|---|
| 82 | # First the binaries
|
|---|
| 83 | @for i in ${BINS} ; do \
|
|---|
| 84 | rm -f ${bindir}/$$i; \
|
|---|
| 85 | done
|
|---|
| 86 | # Remove the mode symlinks
|
|---|
| 87 | @for i in ${NUVEXPORT_LINKS} ; do \
|
|---|
| 88 | rm -f ${bindir}/nuvexport-$$i; \
|
|---|
| 89 | done
|
|---|
| 90 | # Remove the modules
|
|---|
| 91 | @for i in ${MODULES} ; do \
|
|---|
| 92 | rm -f ${MODDIR}/$$i; \
|
|---|
| 93 | done
|
|---|
| 94 |
|
|---|