2012年08月04日 Build k9copy with dvdcss on Slackware-13.37 [長年日記]
_ libmpeg2-0.5.1.tar.gz
I had to install libmpeg.
- tar xvzf libmpeg2-0.5.1.tar.gz
- cd libmpeg2-0.5.1
- ./configure
- make
- make install && ldconfig
_ ffmpeg-0.8.5
I couldn't build k9copy with ffmpeg-0.11.1.
error: 'AVFormatParameters' has not been declared
I had to install OLD ffmpeg-0.8.5.
- tar xvzf ffmpeg-0.8.5.tar.gz
- cd ffmpeg-0.8.5
- ./configure --prefix=/usr/local/ffmpeg-0.8.5 --enable-shared
- make
- make install && ldconfig
_ k9copy-2.3.8
- tar xvzf k9copy-2.3.8-Source.tar.gz
- cd k9copy-2.3.8-Source
- patch -p1 <../k9copy-2.3.8-Source-dvdcss.diff
*** CMakeLists.txt.ORG 2012-08-04 01:40:41.694000462 +0900 --- CMakeLists.txt 2012-08-04 14:34:15.836000487 +0900 *************** *** 69,75 **** FINDAVFORMAT("avformat") FINDAVCODEC("avcodec") ! add_definitions( -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS) add_subdirectory( src/dvdnav) add_subdirectory( src/core ) add_subdirectory( src/mpeg2) --- 69,75 ---- FINDAVFORMAT("avformat") FINDAVCODEC("avcodec") ! add_definitions( -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DHAVE_DVDCSS_DVDCSS_H) add_subdirectory( src/dvdnav) add_subdirectory( src/core ) add_subdirectory( src/mpeg2) *************** *** 351,359 **** MESSAGE(STATUS "Found library solid: ${KDE4_SOLID_LIBS}") ! target_link_libraries(k9copy k9copylib ${KDE4_KDEUI_LIBS} ${PHONON_LIBRARY} ${KDE4_SOLID_LIBS}) ! target_link_libraries(k9play k9copylib ${KDE4_KDEUI_LIBS} ) ! target_link_libraries(k9xineplayer ${KDE4_KDEUI_LIBS} ${XINE_LIBRARY} ${X11_X11_LIB} ) install(TARGETS k9copy DESTINATION ${BIN_INSTALL_DIR} ) install(TARGETS k9play DESTINATION ${BIN_INSTALL_DIR} ) --- 351,359 ---- MESSAGE(STATUS "Found library solid: ${KDE4_SOLID_LIBS}") ! target_link_libraries(k9copy k9copylib ${KDE4_KDEUI_LIBS} ${PHONON_LIBRARY} ${KDE4_SOLID_LIBS} dvdcss) ! target_link_libraries(k9play k9copylib ${KDE4_KDEUI_LIBS} dvdcss ) ! target_link_libraries(k9xineplayer ${KDE4_KDEUI_LIBS} ${XINE_LIBRARY} ${X11_X11_LIB} dvdcss ) install(TARGETS k9copy DESTINATION ${BIN_INSTALL_DIR} ) install(TARGETS k9play DESTINATION ${BIN_INSTALL_DIR} )
- CMAKE_PREFIX_PATH=/usr/local/ffmpeg-0.8.5 cmake .
- make
- make install
2012年08月31日 sample for setting to do NAPT(IP MASQUERADE) by iptables [長年日記]
_ iptables's chain
[Recieved packet] -> [PREROUTING] -> [FORWARD] -> [POSTROUTING] -> [Sending packet] | ^ V | [INPUT] [OUTPUT] | ^ V | [ (recieve) Local process (send) ]
_ iptables's command sequence
- eth0 : Global network
- eth1 : Private network
/usr/sbin/iptables -F # Flush `filter table' /usr/sbin/iptables -t nat -F # Flush `nat table' # /usr/sbin/iptables -P OUTPUT ACCEPT # Set policy for OUTPUT /usr/sbin/iptables -P FORWARD DROP # Set policy for FORWARD /usr/sbin/iptables -P INPUT DROP # Set policy for INPUT # /usr/sbin/iptables -A FORWARD -p udp -i eth1 -o eth0 -s 192.168.0.?? -j ACCEPT # Accept UDP from eth1 to eth0 /usr/sbin/iptables -A FORWARD -p tcp -i eth1 -o eth0 -s 192.168.0.?? -j ACCEPT # Accept TCP from eth1 to eth0 # /usr/sbin/iptables -A FORWARD -i eth0 -o eth1 -d 192.168.0.?? -m state --state ESTABLISHED,RELATED -j ACCEPT # Accept all established packet from eth0 to eth1 # /usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.?? -j MASQUERADE # NAPT for out going from eth0 # /bin/echo 1 >/proc/sys/net/ipv4/ip_forward # Enable IP forward # /usr/sbin/iptables -A INPUT -p all -i eth0 -j DROP # Drop all unknown packet