From b5432e24488f3ba819aabb37d288c71a4ca9a757 Mon Sep 17 00:00:00 2001 From: milisbir Date: Wed, 8 Feb 2017 12:08:55 +0000 Subject: [PATCH] mate-ayarlari --- ayarlar/mate/.config/caja/accels | 173 ++ ayarlar/mate/.config/caja/desktop-metadata | 23 + ayarlar/mate/.config/dconf/user | Bin 0 -> 5604 bytes .../.config/geany/filedefs/filetypes.README | 2 + ayarlar/mate/.config/geany/geany.conf | 221 +++ ayarlar/mate/.config/geany/keybindings.conf | 0 .../.config/geany/templates/templates.README | 2 + ayarlar/mate/.config/mimeapps.list | 5 + ayarlar/mate/.config/user-dirs.dirs | 15 + ayarlar/mate/.config/user-dirs.locale | 1 + mps-0.8/fonks.sh | 244 +++ mps-0.8/mps | 1301 ++++++++++++++ mps-0.8/mpsd | 1540 +++++++++++++++++ mps-0.8/mpsd.conf | 31 + mps-0.8/onmpsd.conf | 32 + 15 files changed, 3590 insertions(+) create mode 100644 ayarlar/mate/.config/caja/accels create mode 100644 ayarlar/mate/.config/caja/desktop-metadata create mode 100644 ayarlar/mate/.config/dconf/user create mode 100644 ayarlar/mate/.config/geany/filedefs/filetypes.README create mode 100644 ayarlar/mate/.config/geany/geany.conf create mode 100644 ayarlar/mate/.config/geany/keybindings.conf create mode 100644 ayarlar/mate/.config/geany/templates/templates.README create mode 100644 ayarlar/mate/.config/mimeapps.list create mode 100644 ayarlar/mate/.config/user-dirs.dirs create mode 100644 ayarlar/mate/.config/user-dirs.locale create mode 100644 mps-0.8/fonks.sh create mode 100755 mps-0.8/mps create mode 100755 mps-0.8/mpsd create mode 100644 mps-0.8/mpsd.conf create mode 100644 mps-0.8/onmpsd.conf diff --git a/ayarlar/mate/.config/caja/accels b/ayarlar/mate/.config/caja/accels new file mode 100644 index 000000000..06d2a8a72 --- /dev/null +++ b/ayarlar/mate/.config/caja/accels @@ -0,0 +1,173 @@ +; caja GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +; (gtk_accel_path "/DirViewActions/Trash" "") +; (gtk_accel_path "/DirViewActions/Save Search" "") +; (gtk_accel_path "/IconViewActions/Sort by Emblems" "") +; (gtk_accel_path "/DirViewActions/Start Volume" "") +; (gtk_accel_path "/NavigationActions/TabsNext" "Page_Down") +; (gtk_accel_path "/DirViewActions/Location Poll" "") +; (gtk_accel_path "/ShellActions/Go to Trash" "") +; (gtk_accel_path "/SpatialActions/Go to Location" "l") +; (gtk_accel_path "/IconViewActions/Stretch" "") +; (gtk_accel_path "/NavigationActions/Tab8" "9") +; (gtk_accel_path "/DirViewActions/MoveToMenu" "") +; (gtk_accel_path "/ShellActions/ZoomInAccel" "equal") +; (gtk_accel_path "/DirViewActions/LocationTrash" "") +; (gtk_accel_path "/DirViewActions/RenameSelectAll" "F2") +; (gtk_accel_path "/NavigationActions/Back" "Left") +; (gtk_accel_path "/DirViewActions/Undo" "z") +; (gtk_accel_path "/NavigationActions/Tab7" "8") +; (gtk_accel_path "/DirViewActions/Location Start Volume" "") +; (gtk_accel_path "/DirViewActions/CopyToMenu" "") +; (gtk_accel_path "/NavigationActions/Add Bookmark" "d") +; (gtk_accel_path "/DirViewActions/Empty Trash" "") +; (gtk_accel_path "/ShellActions/Close" "w") +; (gtk_accel_path "/DirViewActions/LocationRestoreFromTrash" "") +; (gtk_accel_path "/IconViewActions/Manual Layout" "") +; (gtk_accel_path "/ExtensionsMenuGroup/CajaOpenTerminal::open_terminal" "") +; (gtk_accel_path "/ShellActions/Zoom Normal" "0") +; (gtk_accel_path "/NavigationActions/Tab1" "2") +; (gtk_accel_path "/NavigationActions/Show Hide Extra Pane" "F3") +; (gtk_accel_path "/DirViewActions/Create Link" "m") +; (gtk_accel_path "/NavigationActions/Clear History" "") +; (gtk_accel_path "/DirViewActions/LocationDelete" "") +; (gtk_accel_path "/IconViewActions/Sort by Trash Time" "") +; (gtk_accel_path "/DirViewActions/OtherApplication2" "") +; (gtk_accel_path "/DirViewActions/OpenInNewTab" "o") +; (gtk_accel_path "/DirViewActions/OtherApplication1" "") +; (gtk_accel_path "/NavigationActions/Show Hide Statusbar" "") +; (gtk_accel_path "/NavigationActions/Folder Window" "") +; (gtk_accel_path "/NavigationActions/Tab9" "0") +; (gtk_accel_path "/ShellActions/Connect to Server" "") +; (gtk_accel_path "/ShellActions/Help" "") +; (gtk_accel_path "/NavigationActions/Tab6" "7") +; (gtk_accel_path "/NavigationActions/Tab5" "6") +; (gtk_accel_path "/ShellActions/ZoomInAccel2" "KP_Add") +; (gtk_accel_path "/NavigationActions/Tab3" "4") +; (gtk_accel_path "/NavigationActions/Tab2" "3") +; (gtk_accel_path "/NavigationActions/ShowSearch" "f") +; (gtk_accel_path "/NavigationActions/Tab0" "1") +; (gtk_accel_path "/NavigationActions/Tab4" "5") +; (gtk_accel_path "/SpatialActions/Close All Folders" "q") +; (gtk_accel_path "/ShellActions/File" "") +; (gtk_accel_path "/DirViewActions/Format Volume" "") +; (gtk_accel_path "/NavigationActions/TabsPrevious" "Page_Up") +; (gtk_accel_path "/NavigationActions/TabsMoveRight" "Page_Down") +; (gtk_accel_path "/ShellActions/Caja Manual" "F1") +; (gtk_accel_path "/ClipboardActions/Paste" "v") +; (gtk_accel_path "/ShellActions/Go to Network" "") +; (gtk_accel_path "/DirViewActions/Mount Volume" "") +; (gtk_accel_path "/DirViewActions/Copy" "c") +; (gtk_accel_path "/IconViewActions/Sort by Type" "") +; (gtk_accel_path "/ShellActions/View" "") +; (gtk_accel_path "/DirViewActions/New Empty File" "") +; (gtk_accel_path "/ShellActions/About Caja" "") +; (gtk_accel_path "/DirViewActions/Location Eject Volume" "") +; (gtk_accel_path "/IconViewActions/Unstretch" "") +; (gtk_accel_path "/ShellActions/Zoom Out" "minus") +; (gtk_accel_path "/NavigationActions/Show Hide Location Bar" "") +; (gtk_accel_path "/DirViewActions/OpenCloseParent" "Down") +; (gtk_accel_path "/SpatialActions/Close Parent Folders" "w") +; (gtk_accel_path "/DirViewActions/Open" "o") +; (gtk_accel_path "/NavigationActions/Bookmarks" "") +; (gtk_accel_path "/DirViewActions/Self Format Volume" "") +; (gtk_accel_path "/DirViewActions/Unmount Volume" "") +; (gtk_accel_path "/DirViewActions/Connect To Server Link" "") +; (gtk_accel_path "/NavigationActions/Edit Bookmarks" "b") +; (gtk_accel_path "/DirViewActions/Location Unmount Volume" "") +; (gtk_accel_path "/DirViewActions/Reset to Defaults" "") +; (gtk_accel_path "/NavigationActions/SplitViewNextPane" "F6") +; (gtk_accel_path "/DirViewActions/Location Mount Volume" "") +; (gtk_accel_path "/DirViewActions/LocationCut" "") +; (gtk_accel_path "/ShellActions/Zoom In" "plus") +; (gtk_accel_path "/DirViewActions/LocationOpenFolderWindow" "") +; (gtk_accel_path "/DirViewActions/Self Eject Volume" "") +; (gtk_accel_path "/ClipboardActions/Select All" "a") +; (gtk_accel_path "/IconViewActions/Tighter Layout" "") +; (gtk_accel_path "/DirViewActions/Paste Files Into" "") +; (gtk_accel_path "/ClipboardActions/Copy" "c") +; (gtk_accel_path "/DirViewActions/LocationCopy" "") +; (gtk_accel_path "/DirViewActions/OpenAccel" "Down") +; (gtk_accel_path "/DirViewActions/Open With" "") +; (gtk_accel_path "/ShellActions/Edit" "") +; (gtk_accel_path "/ShellActions/Up" "Up") +; (gtk_accel_path "/DirViewActions/Open Scripts Folder" "") +; (gtk_accel_path "/ClipboardActions/Cut" "x") +; (gtk_accel_path "/NavigationActions/Forward" "Right") +; (gtk_accel_path "/DirViewActions/New Documents" "") +; (gtk_accel_path "/NavigationActions/Go to Location" "l") +; (gtk_accel_path "/ShellActions/Reload" "r") +; (gtk_accel_path "/DirViewActions/Move to Home" "") +; (gtk_accel_path "/ShellActions/Backgrounds and Emblems" "") +; (gtk_accel_path "/DirViewActions/No Templates" "") +; (gtk_accel_path "/DirViewActions/Location Format Volume" "") +; (gtk_accel_path "/ShellActions/ZoomOutAccel" "KP_Subtract") +; (gtk_accel_path "/NavigationActions/SplitViewSameLocation" "") +; (gtk_accel_path "/DirViewActions/LocationPasteFilesInto" "") +; (gtk_accel_path "/IconViewActions/Sort by Size" "") +; (gtk_accel_path "/DirViewActions/Select All" "a") +; (gtk_accel_path "/DirViewActions/OpenAlternate" "o") +; (gtk_accel_path "/ShellActions/Preferences" "") +; (gtk_accel_path "/DirViewActions/Poll" "") +; (gtk_accel_path "/DirViewActions/Select Pattern" "s") +; (gtk_accel_path "/DesktopViewActions/Change Background" "") +; (gtk_accel_path "/IconViewActions/Reversed Order" "") +; (gtk_accel_path "/ShellActions/Go to Computer" "") +; (gtk_accel_path "/NavigationActions/Go" "") +; (gtk_accel_path "/DirViewActions/Restore From Trash" "") +; (gtk_accel_path "/DirViewActions/Location Stop Volume" "") +; (gtk_accel_path "/DirViewActions/LocationProperties" "") +; (gtk_accel_path "/DirViewActions/Rename" "F2") +; (gtk_accel_path "/DirViewActions/Redo" "y") +; (gtk_accel_path "/ShellActions/Go to Templates" "") +; (gtk_accel_path "/ShellActions/Show Hidden Files" "h") +; (gtk_accel_path "/DirViewActions/Self Start Volume" "") +; (gtk_accel_path "/DirViewActions/Move to next pane" "") +; (gtk_accel_path "/DirViewActions/OpenFolderWindow" "") +; (gtk_accel_path "/DirViewActions/LocationOpenInNewTab" "") +; (gtk_accel_path "/DirViewActions/Duplicate" "") +; (gtk_accel_path "/DirViewActions/Eject Volume" "") +; (gtk_accel_path "/DirViewActions/Stop Volume" "") +; (gtk_accel_path "/NavigationActions/New Tab" "t") +; (gtk_accel_path "/DirViewActions/PropertiesAccel" "i") +; (gtk_accel_path "/NavigationActions/New Window" "n") +; (gtk_accel_path "/ShellActions/Home" "Home") +; (gtk_accel_path "/IconViewActions/Clean Up" "") +; (gtk_accel_path "/IconViewActions/Sort by Modification Date" "") +; (gtk_accel_path "/DirViewActions/Save Search As" "") +; (gtk_accel_path "/NavigationActions/Search" "") +; (gtk_accel_path "/IconViewActions/Keep Aligned" "") +; (gtk_accel_path "/DirViewActions/New Launcher" "") +; (gtk_accel_path "/DirViewActions/Properties" "Return") +; (gtk_accel_path "/SpatialActions/Add Bookmark" "d") +; (gtk_accel_path "/NavigationActions/TabsMoveLeft" "Page_Up") +; (gtk_accel_path "/DirViewActions/Copy to Desktop" "") +; (gtk_accel_path "/ShellActions/Stop" "") +; (gtk_accel_path "/DirViewActions/New Folder" "n") +; (gtk_accel_path "/DirViewActions/Self Poll" "") +; (gtk_accel_path "/DirViewActions/Move to Desktop" "") +; (gtk_accel_path "/DirViewActions/Cut" "x") +; (gtk_accel_path "/view_as_4" "4") +; (gtk_accel_path "/DirViewActions/Delete" "Delete") +; (gtk_accel_path "/DesktopViewActions/New Launcher Desktop" "") +; (gtk_accel_path "/IconViewActions/Sort by Name" "") +; (gtk_accel_path "/view_as_2" "2") +; (gtk_accel_path "/view_as_3" "3") +; (gtk_accel_path "/DirViewActions/Paste" "v") +; (gtk_accel_path "/DirViewActions/Invert Selection" "i") +; (gtk_accel_path "/view_as_1" "1") +; (gtk_accel_path "/DesktopViewActions/Empty Trash Conditional" "") +; (gtk_accel_path "/NavigationActions/Close All Windows" "q") +; (gtk_accel_path "/IconViewActions/Arrange Items" "") +; (gtk_accel_path "/NavigationActions/Show Hide Sidebar" "F9") +; (gtk_accel_path "/DirViewActions/Self Stop Volume" "") +; (gtk_accel_path "/SpatialActions/Places" "") +; (gtk_accel_path "/NavigationActions/Show Hide Toolbar" "") +; (gtk_accel_path "/SpatialActions/Edit Bookmarks" "b") +; (gtk_accel_path "/DirViewActions/Copy to Home" "") +; (gtk_accel_path "/DirViewActions/Self Mount Volume" "") +; (gtk_accel_path "/SpatialActions/Search" "f") +; (gtk_accel_path "/DirViewActions/Self Unmount Volume" "") +; (gtk_accel_path "/DirViewActions/Copy to next pane" "") +; (gtk_accel_path "/DirViewActions/LocationOpenAlternate" "") diff --git a/ayarlar/mate/.config/caja/desktop-metadata b/ayarlar/mate/.config/caja/desktop-metadata new file mode 100644 index 000000000..b687970f7 --- /dev/null +++ b/ayarlar/mate/.config/caja/desktop-metadata @@ -0,0 +1,23 @@ +[directory] +caja-icon-view-keep-aligned=true +caja-icon-view-layout-timestamp=1486554894 + +[home] +caja-icon-position=64,102 +icon-scale=1 +caja-icon-position-timestamp=1486554894 + +[grub_uefi.volume] +caja-icon-position=64,182 +icon-scale=1 +caja-icon-position-timestamp=1486554894 + +[trash] +caja-icon-position=64,262 +icon-scale=1 +caja-icon-position-timestamp=1486554894 + +[computer] +caja-icon-position=64,22 +icon-scale=1 +caja-icon-position-timestamp=1486554894 diff --git a/ayarlar/mate/.config/dconf/user b/ayarlar/mate/.config/dconf/user new file mode 100644 index 0000000000000000000000000000000000000000..506eb50de885a44dea5fa2e7c3b9b5c36585d24a GIT binary patch literal 5604 zcmaKwdvH|M9mg*(d4!jMHfU_XRYYOkHEdoBVwOAv0~Cx%R9<&CH_0WNy>a)35Nj(| zNbV!zA=s7SPM#2~v3*%rymWk*jI1kRx zL3K}t3!os&MX2~DOo5BDT!K!6%LXum&mx$^mG}^Z;i|JxL@WZuSxV4Sh-R6MiaA-X zM#WsX1}buh;pb(kL`4l;3-jSRsLf#!elaYC>!A*AfE%;aqqo3HSPg5km}o8uK8yC^ z?hz|c&Cz&coiPQS2G8BG`U&+%K96`AIu}0s#nlJZM)?uOLSsI<2L5vAJttI;{6xyH zN52bSAD(ea_mw|~_-1q~G&B?x>i+Voe>=JpRt8@ENOLT&`X5CfgXrq5Y0a^`+PM$y zhQWpVH>!U55yTIpZ^H|}tbSJId{4nDA zXaW4^rX6$CFZs#TQ-;olnbqGdQC$9f;`Qh)u;6Fg9@V(Xt3AzV3g<<}Q_&A4_}# zx(OaE`STCePWj=)??uxrg4^DCvR3uTpG$l*x)mOKo@?Tzgat!?dX8dGPk>*`q^G>IYA@FhO%AqPR@68uF8NQr;SDo@r-kTTn zIvBM1%Q{mQ2&1PAh^%{>4=uB{21a#&|~oHmpR_ zM0hZ~JEHc;D?SAcz^NCWUJxcOKZbZ1odw^&>pQor9(lFD0n{>u-dd>J|yp5Aic8I6y;@?i;D2ao;uk$oyJKa_Yqx(Y(q zzdLj>ae3_n4X6vdeqVTZ0daY?X9IdKY}yugG!F6_&+X^~VAKY;Y2T1nzaB!n;LwZj z#WkMt8i&2;ALN$}d0*|6*E%|kz6E2B9=KF-dA0vT^kdlh^&5>>5tl!Y_y{_a2cN&( zlhFE=_s%ag49`Dx>ln?8yy}^c*23nQ3kp=fyxL!n-XbRbeWl9FYkr&2TVdQ=#d9@} z@?JipTVVQ*E9R;mdDXuQ-3|Ym^2g3f;_{;yhc0w4bUw5usPgjplvn22FyocLNR;bubqv!vFIa#HtzlP(wxt(+pEq-8-5$|^szy6Gs$=FVc`t_XH=%lTtG!1MBCY+>`CS(M{ITtNz zb27HeSM)c-j+=>={@)1HWUneNl}|g3cG6N8yl3)+xz?1|+HJH@nIGp^}c!9=r} zYO;cH%cAF8@tmPjFqpP97~bEs$Hn_K#S7b+q|pHRvrtNg!Q*bWh54kd4G-u^qrF8lHyn-7KsK*i%W}(!^Pp! zd8PBB0hKQ=D+=qo(LmKK{*_jhR@PM3L<7aTRD4$PtZ1ORrn;u6-2WF1l*P(oG^a>) zM*|eEtS+xEkJLo?UTINjQF%?df_#cq#i~kcN^AH+nco(DPyeX1_o}RB1!vmK6p56! zo0?rl)=so|L!o7qOzyFpt? zzdV&_;X{p?aGi8#G+Ni}bX58E$Gl=Rsl!e+I32;HopD3Tp=q!X%0a*H8mvaMJ?Vz@ zyDj{jo*gf@vyHa< zbI!QuPCoTk>Ms6F_vJuNOkZFG*sbDr(snyTIy2a>TFvZ+P!tI^JMARtfC=rJ&jI%v zm~YFy+*(L#`Hi5WwzSpg?OVm%D+t+H^R_GHA4iY(yZmyrZ|Cu5g0E&WM7{AEIDP{^ zC)#OqYp}OB*-by_k5^w_^&SS%v5;PI35*?$M3BWu8I&se|9d$YPOo78?oxL@u<2zl>nBGk7E0&pdC!ZGjs za-F88q<_5iWo$fS-)8a5#HDkSiMSD~&w9V1_Z)F2*>{2sJimGezc-IHkIO)}({pdX z(HOA4l!0y8eB=8$=Tl$fs3CV9C{@}s+7~FFv(ud3IkX>Ub987PEB>sDi(2`9?oD)` zv#+au(cXE|uYD{6PzA%_e{YqP5dZ)H literal 0 HcmV?d00001 diff --git a/ayarlar/mate/.config/geany/filedefs/filetypes.README b/ayarlar/mate/.config/geany/filedefs/filetypes.README new file mode 100644 index 000000000..2d1f679bb --- /dev/null +++ b/ayarlar/mate/.config/geany/filedefs/filetypes.README @@ -0,0 +1,2 @@ +Copy files from /usr/share/geany to this directory to overwrite them. To use the defaults, just delete the file in this directory. +For more information read the documentation (in /usr/share/doc/geany/html/index.html or visit http://www.geany.org/). \ No newline at end of file diff --git a/ayarlar/mate/.config/geany/geany.conf b/ayarlar/mate/.config/geany/geany.conf new file mode 100644 index 000000000..1cb69e68e --- /dev/null +++ b/ayarlar/mate/.config/geany/geany.conf @@ -0,0 +1,221 @@ +[geany] +default_open_path= +cmdline_new_files=true +notebook_double_click_hides_widgets=false +tab_close_switch_to_mru=false +tab_pos_sidebar=2 +sidebar_pos=0 +msgwin_orientation=1 +highlighting_invert_all=false +pref_main_search_use_current_word=true +check_detect_indent=false +detect_indent_width=false +use_tab_to_indent=true +pref_editor_tab_width=4 +indent_mode=2 +indent_type=1 +virtualspace=1 +autocomplete_doc_words=false +completion_drops_rest_of_word=false +autocompletion_max_entries=30 +autocompletion_update_freq=250 +color_scheme= +mru_length=10 +disk_check_timeout=30 +show_editor_scrollbars=true +brace_match_ltgt=false +use_gtk_word_boundaries=true +complete_snippets_whilst_editing=false +use_atomic_file_saving=false +gio_unsafe_save_backup=false +use_gio_unsafe_file_saving=true +keep_edit_history_on_reload=true +show_keep_edit_history_on_reload_msg=true +indent_hard_tab_width=8 +find_selection_type=0 +extract_filetype_regex=-\\*-\\s*([^\\s]+)\\s*-\\*- +replace_and_find_by_default=true +show_symbol_list_expanders=true +compiler_tab_autoscroll=true +allow_always_save=false +statusbar_template=satır: %l / %L kol: %c seç: %s %w %t %mmode: %M kodlama: %e dosyatürü: %f alan: %S +new_document_after_close=false +msgwin_status_visible=true +msgwin_compiler_visible=true +msgwin_messages_visible=true +msgwin_scribble_visible=true +documents_show_paths=true +sidebar_page=0 +pref_main_load_session=true +pref_main_project_session=true +pref_main_project_file_in_basedir=false +pref_main_save_winpos=true +pref_main_confirm_exit=false +pref_main_suppress_status_messages=false +switch_msgwin_pages=false +beep_on_errors=true +auto_focus=false +sidebar_symbol_visible=true +sidebar_openfiles_visible=true +editor_font=Monospace 10 +tagbar_font=Sans 9 +msgwin_font=Monospace 9 +show_notebook_tabs=true +show_tab_cross=true +tab_order_ltr=true +tab_order_beside=false +tab_pos_editor=2 +tab_pos_msgwin=0 +use_native_windows_dialogs=false +show_indent_guide=false +show_white_space=false +show_line_endings=false +show_markers_margin=true +show_linenumber_margin=true +long_line_enabled=true +long_line_type=0 +long_line_column=72 +long_line_color=#C2EBC2 +symbolcompletion_max_height=10 +symbolcompletion_min_chars=4 +use_folding=true +unfold_all_children=false +use_indicators=true +line_wrapping=false +auto_close_xml_tags=true +complete_snippets=true +auto_complete_symbols=true +pref_editor_disable_dnd=false +pref_editor_smart_home_key=true +pref_editor_newline_strip=false +line_break_column=72 +auto_continue_multiline=true +comment_toggle_mark=~ +scroll_stop_at_last_line=true +autoclose_chars=0 +pref_editor_default_new_encoding=UTF-8 +pref_editor_default_open_encoding=None +default_eol_character=2 +pref_editor_new_line=true +pref_editor_ensure_convert_line_endings=false +pref_editor_replace_tabs=false +pref_editor_trail_space=false +pref_toolbar_show=true +pref_toolbar_append_to_menu=false +pref_toolbar_use_gtk_default_style=true +pref_toolbar_use_gtk_default_icon=true +pref_toolbar_icon_style=0 +pref_toolbar_icon_size=0 +pref_template_developer=mahmuy g +pref_template_company= +pref_template_mail=mahmut@milis +pref_template_initial=mg +pref_template_version=1.0 +pref_template_year=%Y +pref_template_date=%Y-%m-%d +pref_template_datetime=%d.%m.%Y %H:%M:%S %Z +context_action_cmd= +sidebar_visible=true +statusbar_visible=true +msgwindow_visible=true +fullscreen=false +scribble_text=Buraya istediğinizi yazabilirsiniz. Karalama defteri olarak kullanabilirsiniz. +scribble_pos=78 +treeview_position=156 +msgwindow_position=368 +geometry=61;69;900;600;0; +custom_date_format= + +[build-menu] +number_ft_menu_items=0 +number_non_ft_menu_items=0 +number_exec_menu_items=0 + +[search] +pref_search_hide_find_dialog=false +pref_search_always_wrap=false +pref_search_current_file_dir=true +find_all_expanded=false +replace_all_expanded=false +position_find_x=-1 +position_find_y=-1 +position_replace_x=-1 +position_replace_y=-1 +position_fif_x=-1 +position_fif_y=-1 +fif_regexp=false +fif_case_sensitive=true +fif_match_whole_word=false +fif_invert_results=false +fif_recursive=false +fif_extra_options= +fif_use_extra_options=false +fif_files= +fif_files_mode=0 +find_regexp=false +find_regexp_multiline=false +find_case_sensitive=false +find_escape_sequences=false +find_match_whole_word=false +find_match_word_start=false +find_close_dialog=true +replace_regexp=false +replace_regexp_multiline=false +replace_case_sensitive=false +replace_escape_sequences=false +replace_match_whole_word=false +replace_match_word_start=false +replace_search_backwards=false +replace_close_dialog=true + +[plugins] +load_plugins=true +custom_plugin_path= +active_plugins=; + +[tools] +terminal_cmd=xterm -e "/bin/sh %c" +browser_cmd=firefox +grep_cmd=grep + +[printing] +print_cmd=lpr '%f' +use_gtk_printing=true +print_line_numbers=true +print_page_numbers=true +print_page_header=true +page_header_basename=false +page_header_datefmt=%c + +[VTE] +load_vte=true +emulation=xterm +send_selection_unsafe=false +send_cmd_prefix= +font=Monospace 10 +scroll_on_key=true +scroll_on_out=true +enable_bash_keys=true +ignore_menu_bar_accel=false +follow_path=false +run_in_vte=false +skip_run_script=false +cursor_blinks=false +scrollback_lines=500 +image= +shell=/bin/bash +colour_fore=#FFFFFF +colour_back=#000000 +last_dir=/home/mahmut + +[project] +session_file= +project_file_path=/home/mahmut/projeler + +[files] +recent_files=/home/mahmut/.config/user-dirs.locale;/home/mahmut/.config/user-dirs.dirs;/home/mahmut/.config/mimeapps.list; +recent_projects= +current_page=2 +FILE_NAME_0=0;None;0;EUTF-8;1;1;0;%2Fhome%2Fmahmut%2F.config%2Fmimeapps.list;0;4 +FILE_NAME_1=0;None;0;EUTF-8;1;1;0;%2Fhome%2Fmahmut%2F.config%2Fuser-dirs.dirs;0;4 +FILE_NAME_2=0;None;0;EUTF-8;1;1;0;%2Fhome%2Fmahmut%2F.config%2Fuser-dirs.locale;0;4 diff --git a/ayarlar/mate/.config/geany/keybindings.conf b/ayarlar/mate/.config/geany/keybindings.conf new file mode 100644 index 000000000..e69de29bb diff --git a/ayarlar/mate/.config/geany/templates/templates.README b/ayarlar/mate/.config/geany/templates/templates.README new file mode 100644 index 000000000..4e21a8abf --- /dev/null +++ b/ayarlar/mate/.config/geany/templates/templates.README @@ -0,0 +1,2 @@ +There are several template files in this directory. For these templates you can use wildcards. +For more information read the documentation (in /usr/share/doc/geany/html/index.html or visit http://www.geany.org/). \ No newline at end of file diff --git a/ayarlar/mate/.config/mimeapps.list b/ayarlar/mate/.config/mimeapps.list new file mode 100644 index 000000000..b9751f787 --- /dev/null +++ b/ayarlar/mate/.config/mimeapps.list @@ -0,0 +1,5 @@ +[Default Applications] +application/octet-stream=geany.desktop + +[Added Associations] +application/octet-stream=geany.desktop; diff --git a/ayarlar/mate/.config/user-dirs.dirs b/ayarlar/mate/.config/user-dirs.dirs new file mode 100644 index 000000000..3bc554f4e --- /dev/null +++ b/ayarlar/mate/.config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/Masaüstü" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_TEMPLATES_DIR="$HOME/Şablonlar" +XDG_PUBLICSHARE_DIR="$HOME/Genel" +XDG_DOCUMENTS_DIR="$HOME/Belgeler" +XDG_MUSIC_DIR="$HOME/Müzik" +XDG_PICTURES_DIR="$HOME/Resimler" +XDG_VIDEOS_DIR="$HOME/Videolar" diff --git a/ayarlar/mate/.config/user-dirs.locale b/ayarlar/mate/.config/user-dirs.locale new file mode 100644 index 000000000..ad989beec --- /dev/null +++ b/ayarlar/mate/.config/user-dirs.locale @@ -0,0 +1 @@ +tr_TR \ No newline at end of file diff --git a/mps-0.8/fonks.sh b/mps-0.8/fonks.sh new file mode 100644 index 000000000..4c60ef0e8 --- /dev/null +++ b/mps-0.8/fonks.sh @@ -0,0 +1,244 @@ +#!/bin/sh + +. /usr/bin/gettext.sh +alias sed="busybox sed" + +# Internal +lgettext() { gettext -d 'x' "$@"; } +translate_query() { + case $1 in + y) lgettext "y";; + Y) lgettext "Y";; + n) lgettext "n";; + N) lgettext "N";; + # Support other cases but keep them untranslated. + *) echo "$1" ;; + esac +} +okmsg="$(lgettext 'Done')" +ermsg="$(lgettext 'Failed')" +: ${okcolor=32} +: ${ercolor=31} +: ${decolor=36} + +# Parse cmdline options and store values in a variable. +for opt in "$@"; do + opt_name="${opt%%=*}"; opt_name="$(echo -n "${opt_name#--}" | tr -c 'a-zA-Z0-9' '_')" + case "$opt" in + --[0-9]*=*) export _$opt_name="${opt#*=}" ;; + --[0-9]*) export _$opt_name=yes ;; + --*=*) export $opt_name="${opt#*=}" ;; + --*) export $opt_name=yes ;; + esac +done +[ "$HTTP_REFERER" ] && output='html' + + + + +# i18n functions +_() { local T="$1"; shift; printf "$(eval_gettext "$T")" "$@"; echo; } +_n() { local T="$1"; shift; printf "$(eval_gettext "$T")" "$@"; } +_p() { local S="$1" P="$2" N="$3"; shift 3; printf "$(ngettext "$S" "$P" "$N")" "$@"; } + +# Get terminal columns +get_cols() { stty size 2>/dev/null | awk -vc=$cols 'END{print c?c:($2 && $2<80)?$2:80}'; } + +# Last command status +status() { + local ret_code=$? + [ -n "$quiet" -a "$ret_code" -eq 0 ] && return + [ -n "$quiet" ] && action "$saved_action" no-quiet + + case $ret_code in + 0) local msg="$okmsg" color="$okcolor";; + *) local msg="$ermsg" color="$ercolor";; + esac + case $output in + raw|gtk) echo " $msg";; + html) echo " $msg";; + *) echo -e "[ \\033[1;${color}m$msg\\033[0;39m ]";; + esac +} + +# Line separator +separator() { + [ -n "$quiet" ] && return + case $output in + gtk) echo '--------';; + html) echo -n '
';; + *) printf "%$(get_cols)s\n" | tr ' ' "${1:-=}";; + esac +} + +# New line +newline() { + [ -z "$quiet" ] && echo +} + +# Display a bold message +boldify() { + [ -n "$quiet" ] && return + case $output in + raw) echo "$@" ;; + gtk) echo "$@" ;; + html) echo "$@" ;; + *) echo -e "\\033[1m$@\\033[0m" ;; + esac +} + +# renkli mesaj +ryaz() { + [ -n "$quiet" ] && return + : ${color=$1} + shift + case $output in + raw|gtk) echo "$@";; + html) echo -n "$@";; + *) case $color in + 0*) echo -e "\\033[${color:-38}m$@\\033[39m";; + *) echo -e "\\033[1;${color:-38}m$@\\033[0;39m";; + esac;; + esac + unset color +} + +# Indent text +indent() { + [ -n "$quiet" ] && return + local in="$1" + shift + echo -e "\033["$in"G $@"; +} + +# Extended MeSsaGe output +emsg() { + [ -n "$quiet" ] && return + local sep="\n$(separator)\n" + case $output in + raw) + echo "$@" | sed -e 's|||g; s|||g; s|||g; \ + s|||g; s|<->|'$sep'|g; s||\n|g; s|| |g' ;; + gtk) + echo "$@" | sed -e 's|||g; s|||g; s|<->|'$sep'|g; \ + s||\n|g; s|| |g' ;; + html) + echo "$@" | sed -e 's|||g; s|||g; \ + s|||g; s|||g; \ + s||
|g; s|<->|
|g; s|| |g' ;; + *) + echo -en "$(echo "$@" | sed -e 's||\\033[1m|g; s||\\033[0m|g; + s||\\033[\1m|g; s||\\033[1;\1m|g; + s||\\033[0;39m|g; s||\n|g; + s|<->|'$sep'|g; s||\\033[\1G|g')" + [ "$1" != "-n" ] && echo + ;; + esac +} + +# Check if user is logged as root +check_root() { + if [ $(id -u) -ne 0 ]; then + lgettext "You must be root to execute:"; echo " $(basename $0) $@" + exit 1 + fi +} + +# Display debug info when --debug is used. +debug() { + [ -n "$debug" ] && echo "$(colorize $decolor 'DEBUG:') $1" +} + +# Confirmation +confirm() { + if [ -n "$yes" ]; then + true + else + if [ -n "$1" ]; then + echo -n "$1 " + else + echo -n " ($(translate_query y)/$(translate_query N)) ? " + fi + read answer + [ "$answer" == "$(translate_query y)" ] + fi +} + +# Log islemleri +log() { + echo "$(date '+%F %R') : $@" >> ${faaliyet:-/var/log/islem.log} +} + +# Print two-column list of options with descriptions +optlist() { + [ -n "$quiet" ] && return + local in="$(echo "$1" | sed 's| *| |g')" w=$(get_cols) col1=1 line + IFS=$'\n' + for line in $in; do + col=$(echo -n "$line" | cut -f1 | wc -m) + [ $col -gt $col1 ] && col1=$col + done + echo "$in" | sed 's|\t|&\n|' | fold -sw$((w - col1 - 4)) | \ + sed "/\t/!{s|^.*$|[$((col1 + 4))G&|g}" | sed "/\t$/{N;s|.*| &|;s|\t\n||}" +} + +# Wrap words in long terminal message +longline() { + [ -n "$quiet" ] && return + local w=$(get_cols) + echo -e "$@" | fold -sw$w +} + +# Print localized title +title() { + [ -n "$quiet" ] && return + case $output in + html) echo "
$(_ "$@")
";;
+		*) newline; boldify "$(_ "$@")"; separator;;
+	esac
+}
+
+# Print footer
+footer() {
+	[ -n "$quiet" ] && return
+	case $output in
+		html) echo "
$1
";; + *) separator; echo "$1"; [ -n "$1" ] && newline;; + esac +} + +# Print current action +saved_action='' +action() { + saved_action="$1" + [ -n "$quiet" -a -z "$2" ] && return + local w c scol msg chars + w=$(_ 'w'); w=${w/w/10} + c=$(get_cols) + scol=$(( $c - $w )) + msg="$(_n "$@" | fold -sw$scol)" + chars=$(echo -n "$msg" | tail -n1 | wc -m) + msg="$(printf '%s%'$(( $scol - $chars ))'s' "$msg" '')" + + case $output in + raw|gtk|html) echo -n "$msg";; + *) echo -ne "\033[0;33m$msg\033[0m";; + esac +} + +# Print long line as list item +itemize() { + [ -n "$quiet" ] && return + case $output in + gtk) echo "$@";; + *) + local inp="$@" w=$(get_cols) first offset + first="$(echo -e "$inp" | fold -sw$w | head -n1)" + echo "$first" + cols1="$(echo "${first:1}" | wc -c)" + offset=$(echo "$first" | sed -n 's|^\([^:\*-]*[:\*-]\).*$|\1|p' | wc -m) + echo "${inp:$cols1}" | fold -sw$((w - offset)) | awk \ + '($0){printf "%'$offset's%s\n","",$0}' + ;; + esac +} diff --git a/mps-0.8/mps b/mps-0.8/mps new file mode 100755 index 000000000..14ed6b647 --- /dev/null +++ b/mps-0.8/mps @@ -0,0 +1,1301 @@ +#!/bin/bash +. /etc/mpsd.conf +if [ -f /etc/mps.conf ];then +. /etc/mps.conf +fi +. /root/bin/fonks.sh +versiyon="0.8.6" +iletisim="milisarge@gmail.com" +paketdepo="/depo/paketler/" +if [ -z ${sunucu+:} ]; then + sunucu="127.0.0.1:8000/" +fi +#sunucu="http://milis.gungre.ch/packages/" +git_sunucu="https://github.com/milisarge/malfs-milis" +ikaynak="" +betikad=${0##*/} +kurulum_onay="evet" +talimatname_dizin="/root/talimatname" +kokdizin="/" +VT="/var/lib/pkg/DB" +TARIHCE_DIZIN="/var/lib/pkg/tarihce" +LOGDIZIN="/var/log/mps" +tekrarkur="hayir" +#temel paket koruma +tpk="evet" +if [ -z ${lokal+:} ]; then + lokal="tr" +fi +if [ -z ${docsil+:} ]; then + docsil="evet" +fi +if [ -z ${yerelsil+:} ]; then + yerelsil="evet" +fi + + +icerik_ekle(){ + paketad=`echo "$1" | cut -d'#' -f1` + paketad=`basename $paketad` + ryaz 34 $paketad" paketi kuruluyor-> $kokdizin" + tar -C /tmp --extract --file=$1 .PRE 1 2> /tmp/$paketad_pre.log + #kos-kur kontrolu + if [ -f /tmp/.PRE ];then + if [ "$kokdizin" == "/" ];then + bash /tmp/.PRE + else + cp /tmp/.PRE $kokdizin/tmp/$paketad.PRE + fi + rm /tmp/.PRE + fi + mkdir -p kur.$paketad && + tar xf $1 -C kur.$paketad && + #istenmeyen yerellerin silinmesi + if [ -d kur.$paketad/usr/share/locale ] && [ "$yerelsil" == "evet" ];then + for lkl in `ls kur.$paketad/usr/share/locale/`;do + if [ "$lkl" != "$lokal" ];then rm -r kur.$paketad/usr/share/locale/$lkl; fi + done + fi + #doc dizini silinmesi + if [ -d kur.$paketad/usr/share/doc ] && [ "$docsil" == "evet" ];then + rm -r kur.$paketad/usr/share/doc + fi + mkdir -p $kokdizin/var/lib/pkg/DB/"$paketad" && + cp -v -afr kur.$paketad/* $kokdizin > kur.$paketad/kurulan + cp kur.$paketad/kurulan /tmp/ &&cat kur.$paketad/kurulan | cut -d '>' -f2 > $kokdizin/var/lib/pkg/DB/"$paketad"/kurulan && + #mv kur.$paketad/.MTREE /var/lib/pkg/DB/"$paketad"/files && + mv kur.$paketad/.META $kokdizin/var/lib/pkg/DB/"$paketad"/META && + + #kur-kos calistirilmasi + if [ -f kur.$paketad/.POST ];then + if [ "$kokdizin" == "/" ];then + bash kur.$paketad/.POST + else + cp kur.$paketad/.POST $kokdizin/tmp/$paketad.POST + fi + rm kur.$paketad/.POST + fi + + rm -r kur.$paketad + if [ -f $kokdizin/etc/ld.so.conf ];then + ldconfig -r $kokdizin + fi + ryaz 34 $paketad" paketi kuruldu." + loglama "$paketad paketi kuruldu." + +} + +paket_sil(){ + local paket kkont sil_onay oto_silme + paket="$1" + if [ "$2" ]; then + oto_silme="$2" + fi + if [ "$tpk" = "evet" ] && [ -d "$talimatname_dizin/temel/$1" ];then + ryaz 31 "$1 temel sistem paketidir.Silinemez!!!" + else + kkont=`kurulu_kontrol "$1"` + if [ "$kkont" = "kurulu" ];then + if [ -f "/var/lib/pkg/DB/$paket/kurulan" ];then + #dizin koruma + kurban_kurtar $1 + cat /var/lib/pkg/DB/$paket/kurulan | cut -d '>' -f2 > /tmp/$paket.sil + ryaz 31 "ters bagimliliklar" + ryaz 31 "------------------" + ters_bagimli_kontrol "$paket" + ryaz 31 "------------------" + ryaz 31 "kurban dosyalar" + ryaz 31 "------------------" + silme_kurban_kontrol /tmp/$paket.sil + ryaz 31 "------------------" + if [ "$oto_silme" = "evet" ];then + sil_onay="e" + else + while true; do + ryaz 34 $paket" paketi kaldırılsın mı?";read -p "e veya h-> " eh + case $eh in + [Ee]* ) sil_onay="e"; break;; + [Hh]* ) break;; + * ) echo "e veya h";; + esac + done + fi + if [ "$sil_onay" = "e" ];then + xargs rm -r -f < /tmp/$paket.sil && + rm -r -f /var/lib/pkg/DB/"$paket" && + ryaz 34 $paket" paketi silindi." + loglama "$paket paketi silindi." + rm -f /tmp/$paket.sil + else + rm -f /tmp/$paket.sil + exit 1 + fi + + else + ryaz 31 "kritik mesaj:kurulanlar dosyası yok." + fi + else + ryaz 32 "paket zaten kurulu değil!" + fi + fi + +} +paket_ara(){ + paket="$1" + for pkt in `cat /depo/paketler/paket.vt | grep $paket | awk '{print $1}'`; do + pakdesc=$(find /root/talimatname -name "$pkt" | xargs -I % sed -n '1{p;q}' %/talimat | sed s'/# Description: //g'); + ryaz 34 "$pkt - $pakdesc"; + done +} +kelime_bul(){ + grep --color -H -ri "$1" /root/talimatname/ +} +paket_bilgi2(){ + local paket kkont + kkont=`kurulu_kontrol "$1"` + if [ "$kkont" = "kurulu" ];then + paket="$1" + cat /var/lib/pkg/DB/"$paket"/META + else + echo "paket kurulu değil!" + fi + +} + +paket_bilgi(){ + local paket kkont + kkont=`kurulu_kontrol "$1"` + if [ "$kkont" = "kurulu" ];then + paket="$1" + satir=`sed -n '1p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "AD:" ${satir:1:${#satir}-1} + satir=`sed -n '2p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "TN:" ${satir:1:${#satir}-1} + satir=`sed -n '3p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "UR:" ${satir:1:${#satir}-1} + satir=`sed -n '4p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "YP:" ${satir:1:${#satir}-1} + satir=`sed -n '5p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "PK:" ${satir:1:${#satir}-1} + satir=`sed -n '6p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "--:" ${satir:1:${#satir}-1} + satir=`sed -n '7p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "VS:" ${satir:1:${#satir}-1} + satir=`sed -n '8p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "RL:" ${satir:1:${#satir}-1} + satir=`sed -n '9p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "DZ:" `date -d @${satir:1:${#satir}-1}` + else + echo "paket kurulu değil!" + fi + +} + +yeniden_paketle(){ + cd $1 + bsdtar -r -f ../"$1".mps .META + bsdtar -r -f ../"$1".mps * + cd .. + lzip -9 "$1".mps +} + +derleme_listyap(){ + bagimlist=`bagimlilar "$1"` + + if [ "$bagimlist" != "talimatyok" ];then + for bagim in $bagimlist;do + + if [ "`cat tumbag.liste | grep $bagim`" != "$bagim" ];then + derleme_listyap "$bagim" + fi + + done + + if ! grep -Fxq "$1" tumbag.liste + then + ana="`find $talimatname_dizin -name $1`" + echo ${ana#"$talimatname_dizin"} + #sadece genel bagimliliklar derlenecek + echo "$1" >> tumbag.liste + if [ -d "$talimatname_dizin/genel/$1" ];then + echo "$1" >> bag.liste + fi + fi + else + ryaz 31 "$1 talimatı bulunamadı." + exit 1 + fi +} + +derleme_listbilgi(){ + ryaz 34 "yapim asamasında" +} + +paket_derle_liste(){ + for dpkt in `cat $1`;do + echo $dpkt "derleniyor...." + zorla_derle="yok" + paket_derle $dpkt + done +} +#otomatik derle kontrollu kur +paket_derle_kur(){ + tekrarkur="hayir" + mps -dly "$1" && mps -derlist bag.liste +} + +paket_kur_oto(){ + local kpkt pkt pak kliste + if [ "$1" = "-H" ];then + ls *.mps.lz > "otokur.list" + kliste="otokur.list" + else + kliste="$1" + fi + for kpkt in `cat $kliste`;do + for pkt in `ls $kpkt* | cut -d'#' -f1`;do + pak=`ls "$pkt#"*` + mps -k "$pak" && mps -kur "$pkt" + done + done + rm -rf otokur.list +} + +paket_kur_oto_zorla(){ + local kpkt pkt pak kliste + if [ "$1" = "-H" ];then + ls *.mps.lz > "otokur.list" + kliste="otokur.list" + else + kliste="$1" + fi + for kpkt in `cat $kliste`;do + for pkt in `ls $kpkt* | cut -d'#' -f1`;do + pak=`ls "$pkt#"*` + paket_sil "$pkt" "evet" + mps -k "$pak" && mps -kur "$pkt" + done + done + rm -rf otokur.list +} + +paket_kur_liste(){ + local kpkt pkt pak + for kpkt in `cat $1`;do + for pkt in `ls $kpkt* | cut -d'#' -f1`;do + pak=`ls "$pkt#"*` + mps -k "$pak" + done + done +} + +paket_kur_liste_zorla(){ + local kpkt pkt pak + for kpkt in `cat $1`;do + for pkt in `ls $kpkt* | cut -d'#' -f1`;do + pak=`ls "$pkt#"*` + paket_sil "$kpkt" "evet" + mps -k "$pak" + done + done +} + +#otomatik kontrollu kur +paket_kur_oto2(){ + mps -dly "$1" > /dev/null && mps -ok bag.liste +} + +paket_inkur_liste_direk(){ + local kpkt + for kpkt in `cat $1`;do + mps -ik "$kpkt" + done +} + +paket_inkur_liste(){ + local kpkt + for kpkt in `cat $1`;do + mps -kur "$kpkt" + done +} + +#otomatik kontrollu kur +paket_inkur_oto(){ + mps -dly "$1" > /dev/null && + local kpkt + for kpkt in `cat bag.liste`;do + mps -ik "$kpkt" + done + rm -rf *.liste *.eski +} + +paket_sil_oto(){ + local spkt + for spkt in `cat $1`;do + oto_silme="evet" + paket_sil "$spkt" "$oto_silme" + done +} + +paket_guncelle(){ + surum_kontrol $1 + devir_kontrol $1 +} + +paket_guncelle_oto(){ + mps -dly "$1" > /dev/null && + local kpkt + for kpkt in `cat bag.liste`;do + mps -g "$kpkt" + done + rm bag.liste tumbag.liste +} + +sistem_guncelle(){ + local kpkt + for kpkt in `mps -kl`;do + mps -g "$kpkt" + done +} + +surum_kontrol(){ + local ksurum version pkt dusuk yuksek durum + durum="belirsiz" + satir=`sed -n '7p' < /var/lib/pkg/DB/"$1"/META` + ksurum=${satir:1:${#satir}-1} + pkt="`find $talimatname_dizin -name $1`" + source $pkt/talimat + dusuk=`echo -e "$ksurum\n$version" | sort -V | head -n1` + + if [ "$ksurum" = "$version" ];then + durum="guncel" + else + if [ "$ksurum" = "$dusuk" ];then + durum="yukselt" + else + durum="dusur" + fi + + if [ "$durum" <> "guncel" ];then + mps -s $1 + mps -ik $1 + fi + fi + ryaz 33 "$1 surum kontrolu $ksurum & $version $durum" +} + +devir_kontrol(){ + local kdevir release pkt dusuk yuksek durum + durum="belirsiz" + satir=`sed -n '8p' < /var/lib/pkg/DB/"$1"/META` + kdevir=${satir:1:${#satir}-1} + pkt="`find $talimatname_dizin -name $1`" + source $pkt/talimat + dusuk=`echo -e "$kdevir\n$release" | sort -V | head -n1` + + if [ "$kdevir" = "$release" ];then + durum="guncel" + else + if [ "$kdevir" = "$dusuk" ];then + durum="yukselt" + else + durum="dusur" + fi + + if [ "$durum" <> "guncel" ];then + mps -s $1 + mps -ik $1 + fi + fi + ryaz 33 "$1 devir kontrolu $kdevir & $release $durum" +} + +paket_derle(){ + #eski derleme kalıntılarını temizle + if [ -d tmp.* ];then + rm -r tmp.* + fi + kaynakdizin_kontrol + local konum derleme_onay eh bagimd + derleme_onay="h" + konum="`find "$talimatname_dizin" -name $1`" + if [ -d "$konum" ];then + mkdir -p tmp."$1" + cp -a $konum/* tmp."$1"/ + cd tmp."$1" + if [ "`kurulu_kontrol "$1"`" = "kurulu" ] && [ "$zorla_derle" = "yok" ];then + derleme_onay="h" + else + echo "-----" + derleme_onay="e" + fi + if [ "$derleme_onay" = "e" ];then + ryaz 33 "$1" "derleniyor...." + #mpsd -d > /dev/null + #mpsd -d + echo "------------------------" + mpsd -d 2>&1|tee /tmp/"$1".log + if ( grep "^=======>" /tmp/"$1".log| tail -1 |grep "ERROR" > /dev/null);then + echo "derleme sisteminde hata oluştu -----> " /tmp/"$1".log + exit 1 + fi + if [ "$kurulum_onay" = "evet" ];then + for kpkt in `ls $1* | cut -d'#' -f1`;do + mps -k "$kpkt#"* + done + fi + mv *.mps.lz ../ + else + ryaz 32 "paket zaten kurulu,yine de derlemek için: + mps -zd $1" + fi + cd .. + rm -r tmp."$1" + else + ryaz 31 "talimat dosyası bulunamadı." + fi + +} + + +bagimlilar(){ + local bagimd konum + konum="`find "$talimatname_dizin" -name $1`" + if [ -f "$konum/talimat" ];then + bagimd=`cat $konum/talimat | grep "Depends on" | cut -d':' -f2` + + if [ -n "$bagimd" ]; then + bagimd=`echo "$bagimd" | sed 's/,/ /g'` + #sıralı gösterme + echo `echo "$bagimd" | sed 's/,/ /g'` + fi + else + echo "talimatyok" + exit 1 + fi +} + +bagimli_bilgi(){ + local bagimd konum bag + konum="`find "$talimatname_dizin" -name $1`" + bagimd=`cat $konum/talimat | grep "Depends" | cut -d':' -f2` + if [ -n "$bagimd" ]; then + bagimd=`echo "$bagimd" | sed 's/,/ /g'` + #sıralı gösterme + #echo `echo "$bagimd" | sed 's/,/ /g'` + #kurulu kontrollu gosterim + for bag in $bagimd;do + echo $bag "`kurulu_kontrol $bag`" + done + fi + echo "$1" "`kurulu_kontrol $1`" + +} + +ters_bagimli(){ + local ara + ara=" $1 " + sy=`grep -o "/" <<<"$talimatname_dizin" | wc -l` + grep -rli "$ara" "$talimatname_dizin" | cut -d'/' -f`expr $sy + 3` +} + +silme_kurban_kontrol(){ + local dizin + for f in $(cat $1) ; do + dizin="${f%\'}" + dizin="${dizin#\'}" + if [ -d "$dizin" ];then + for g in `ls "$dizin"` ; do + if ! grep -Fxq " '$dizin/$g'" "$1" + then + echo "$dizin/$g" + fi + done + fi + done +} + +kurban_kurtar(){ + local dizin paket + paket=$1 + if [ -f /var/lib/pkg/DB/$paket/kurulan ];then + cat /var/lib/pkg/DB/$paket/kurulan | cut -d '>' -f2 > /tmp/$paket.sil + for f in $(cat /tmp/$paket.sil) ; do + dizin="${f%\'}" + dizin="${dizin#\'}" + if [ -d "$dizin" ];then + for g in `ls "$dizin"` ; do + if ! grep -Fxq " '$dizin/$g'" "/tmp/$paket.sil" + then + if [ -f /tmp/$paket.kurtar ];then + rm /tmp/$paket.kurtar + fi + echo " '$dizin'" >> "/tmp/$paket.kurtar" + fi + done + fi + done + if [ -f /tmp/$paket.kurtar ];then + mv /var/lib/pkg/DB/$paket/kurulan /var/lib/pkg/DB/$paket/ilk.kurulan + grep -v -F -x -f "/tmp/$paket.kurtar" "/tmp/$paket.sil" > /var/lib/pkg/DB/$paket/kurulan + ryaz 32 "$paket kurban dosyaları kurtarıldı." + else + ryaz 32 "$paket kurban dosyası yok." + fi + rm -f /tmp/$paket.sil + else + ryaz 31 "kurulan paket yok!" + fi +} + +ters_bagimli_kontrol(){ + ters_bagimli "$1" | sort > tersb.liste + ls /var/lib/pkg/DB/ | sed "/$1/d" | sort > simdiki.liste + comm -12 tersb.liste simdiki.liste + rm tersb.liste simdiki.liste +} + +kurulu_kontrol(){ + if [ -d "$kokdizin/var/lib/pkg/DB/$1" ];then + echo "kurulu" + exit 1 + fi + echo "degil" +} + +sistem_kur(){ + local spaket + for spaket in `cat $1`;do + ./$betikad -ik "$spaket" -kok $2; + done +} + +kaynakdizin_kontrol(){ + if [ ! -d $DERLEME_KAYNAKDIZIN ];then + mkdir $DERLEME_KAYNAKDIZIN + fi +} + +logdizin_kontrol(){ + if [ ! -d $kokdizin$LOGDIZIN ];then + mkdir $kokdizin$LOGDIZIN + fi + if [ ! -d $kokdizin$LOGDIZIN/derleme ];then + mkdir $kokdizin$LOGDIZIN/derleme + fi + if [ ! -f $kokdizin$LOGDIZIN/mps.log ];then + touch $kokdizin$LOGDIZIN/mps.log + fi +} + +tarihce_dkontrol(){ + if [ ! -d $TARIHCE_DIZIN ];then + mkdir $TARIHCE_DIZIN + fi +} + +temel_tarihce_kontrol(){ + if [ ! -f $TARIHCE_DIZIN/temel-pkvt.tar.lz ];then + tarihce_olustur "temel" + fi +} + +tarihce_liste(){ + tarihce_dkontrol + ls $TARIHCE_DIZIN/ + +} + +tarihce_yap(){ + tarihce_dkontrol + local t_isim + if [ "$temel_tarihce" = "evet" ];then + t_isim="temel" + else + t_isim=`date +%m-%d-%y.%H%M%S` + fi + tarihce_olustur "$t_isim" +} + +tarihce_olustur(){ + bsdtar -P -r -f $TARIHCE_DIZIN/"$1"-pkvt.tar $VT + lzip -9 $TARIHCE_DIZIN/"$1"-pkvt.tar +} + +tarihce_yukle(){ + tarihce_dkontrol + local islem_onay cikis + sil_onay="h" + if [ -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" ];then + bsdtar -p -o -C /tmp -xf $TARIHCE_DIZIN/"$1-pkvt.tar.lz" 2>/dev/null + ls /tmp/var/lib/pkg/DB/ > hedef.pkvt + ls /var/lib/pkg/DB/ > simdiki.pkvt + grep -v -F -x -f hedef.pkvt simdiki.pkvt > sil.liste + grep -v -F -x -f simdiki.pkvt hedef.pkvt > kur.liste + #rm hedef.pkvt simdiki.pkvt + rm -r /tmp/var + cikis="" + if [ -s sil.liste ];then + ryaz 32 "silinecekler" + ryaz 32 "------------" + cat sil.liste + fi + + if [ -s kur.liste ];then + ryaz 32 "kurulacaklar" + ryaz 32 "------------" + cat kur.liste + fi + if [ ! -s sil.liste ] && [ ! -s kur.liste ];then + ryaz 32 "sistem zaten hedef durumda!" + exit 1 + fi + while true; do + ryaz 34 "otomatik geri dönüşüm başlasın mı?";read -p "e veya h-> " eh + case $eh in + [Ee]* ) islem_onay="e"; break;; + [Hh]* ) break;; + * ) echo "e veya h";; + esac + done + if [ "$islem_onay" = "e" ];then + mps -os sil.liste + mps -kurul kur.liste + mv sil.liste silinenler.liste + mv kur.liste kurulanlar.liste + exit 1 + fi + mv sil.liste sil_iptal.liste + mv kur.liste kur_iptal.liste + else + ryaz 31 "ilgili tarihce dosyası bulunamadı!" + fi +} + +tarihce_sil(){ + tarihce_dkontrol + if [ -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" ];then + rm -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" + else + ryaz 31 "ilgili tarihce dosyası bulunamadı!" + fi +} + +loglama(){ + logdizin_kontrol + echo "$(date +'%F %T') $1" >> "$kokdizin/$LOGDIZIN/mps.log" +} + +dosyadan_talimat_islem(){ + local dosya + dosya=$1 + urlkont='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' + if [[ $dosya =~ $urlkont ]] + then + ryaz 32 "talimat linkten cekilecek" + gdosya=`mktemp` + wget $dosya -O $gdosya + dosya=$gdosya + fi + if [ ! -f $dosya ];then + ryaz 31 "$dosya talimat dosyasi yok!" + exit 1 + fi + + local paketisim + paketisim=`grep -ri 'name=' $dosya | cut -d'=' -f 2` + if [ ! -n "$paketisim" ]; then + ryaz 31 "paket ismi degiskeni bulunamadı!" + exit 1 + fi + if [ ! -f /root/talimatname/genel/$paketisim ];then + mkdir /root/talimatname/genel/$paketisim + cp -f $dosya /root/talimatname/genel/$paketisim/talimat + ryaz 32 "$paketisim talimatı hazırlandı." + else + ryaz 31 "$paketisim talimatı zaten talimatnamede var!" + fi +} + +talimat_olustur(){ +if [ "$1" = '?' ];then + ryaz 34 "kullanım : mps -to paket_ismi" +else + local name + name=$1 + mkdir -p $name + tee "$name/talimat" > /dev/null < /dev/null; then + if [ $? -eq 0 ]; then + ryaz 32 "paket veritabanı guncellenıyor." "$paketdepo""paket.vt" + if [ -f "$paketdepo""paket.vt" ];then + mv "$paketdepo""paket.vt" "$paketdepo""paket.vt.eski" + fi + wget -q --show-progress -P "$paketdepo" "$sunucu""paket.vt" + #rm /tmp/paket.vt* + mps -kudo + exit 1 + fi + ryaz 31 "paket veritabanı guncelleme olumsuz." +} + +talimat_bilgi(){ + local konum HEAD + konum="`find "$talimatname_dizin" -name $1`" + HEAD=`grep -B 12 "build()" $konum/talimat` + echo $HEAD +} + +sistem_kontrol(){ + paketvt_kontrol + sunucu_kontrol +} + +sunucu_kontrol(){ + wget -q --spider $sunucu + if [ $? -eq 0 ]; then + ryaz 32 "paket sunucu aktif" + else + ryaz 31 "sunucu erişim dışı" + exit 1 + fi +} + +gitayar_kontrol(){ + if [ ! -f /root/.gitconfig ];then + git_ssl_iptal + git_otokimlik + fi +} + +kurulum_dogrulama(){ + for kuruland in `ls $VT` + do + if [ ! -f "$VT/$kuruland/kurulan" ]; then + ryaz 32 "$kuruland hasarlı kurulum tesbiti!" + rm -r $VT/$kuruland + mps -i $kuruland + mps -k "$paketdepo/$kuruland"*.mps.lz + ryaz 32 "$kuruland hasarlı kurulum onarıldı." + fi + done +} + +kurulum_dosya_listele(){ + cat "$VT/$1/kurulan" +} + +paketvt_kontrol(){ + mkdir -p /depo/paketler + if [ ! -f /depo/paketler/paket.vt ];then + touch /depo/paketler/paket.vt + fi +} + +pvt_olustur(){ + if [ ! -f paket.vt ];then + touch paket.vt + fi + if [ -f "paket.vt" ];then + mv "paket.vt" "paket.vt.eski" + fi + ryaz 32 "paket.vt oluşturuluyor...." + for paket in `ls *.mps.lz` + do + paketad="`echo $paket|cut -d "#" -f1`" + shaek=`sha1sum $paket` + + echo $paketad $shaek >> paket.vt + done + ryaz 32 "paket.vt oluşturuldu." +} + +paket_indir(){ + local pkt + if [ -f "$paketdepo""paket.vt" ];then + pkt=`cat "$paketdepo""paket.vt" | grep "^$1 " | cut -d' ' -f3` + ekontdeg=`cat "$paketdepo""paket.vt" | grep "^$1 " | cut -d' ' -f2` + cpaket="${pkt/'#'/'%23'}" + wget -nc -q --show-progress -P "$paketdepo" "$sunucu$cpaket" + if [[ "$?" != 0 ]]; then + ryaz 31 "indirme hatalı" + else + ryaz 34 "$1 indirildi" + fi + mkontdeg=`sha1sum "$paketdepo$pkt" | cut -d' ' -f1` + if [ "$ekontdeg" != "$mkontdeg" ];then + ryaz 31 "sha1sum uyusmaslik tesbit edildi,paket tekrar indiriliyor." + rm -f "$paketdepo$pkt" + paket_indir "$1" + fi + fi + + +} + +yardim(){ + echo "yardim" +} + + +ayarlar() { + + while [ "$1" ]; do + case $1 in + -i|--indir) + ikaynak="ag" + kurulum_onay="olumsuz";; + -ik|--inku) + if [ "$3" == "-kok" ] && [ -d "$4" ]; then + kokdizin="$4" + fi + ikaynak="ag" ;; + -ikz|--inkuzo) + ikaynak="ag" + tekrarkur="evet" ;; + -k|--yrku) + if [ "$3" == "-kok" ] && [ -d "$4" ]; then + kokdizin="$4" + tekrarkur="evet" + fi + ikaynak="yerel" ;; + -s|sil) + if [[ "$2" == "py-"* ]]; then + pypaket=`echo "$2" | cut -d'-' -f 2` + echo $pypaket "pip2 ile silinecek" + pip uninstall $pypaket + exit 1 + fi + if [[ "$2" == "py3-"* ]]; then + pypaket=`echo "$2" | cut -d'-' -f 2` + echo $pypaket "pip3 ile silinecek" + pip3 uninstall $pypaket + exit 1 + fi + paket_sil "$2" ;; + -sz|zorsil) + paket_sil "$2" "evet";; + -pa|ara) + paket_ara "$2" ;; + bul) + kelime_bul "$2" ;; + -d|--pkde) + zorla_derle="yok" + kurulum_onay="olumsuz" + paket_derle "$2" ;; + -zd|--pkzde) + zorla_derle="evet" + kurulum_onay="olumsuz" + paket_derle "$2" ;; + -dk|--pkdk) + paket_derle "$2" ;; + -derlist) + paket_derle_liste "$2" ;; + -derle) + paket_derle_kur "$2" ;; + -ok|--pkok) + paket_kur_oto "$2" ;; + -okz) + paket_kur_oto_zorla "$2" ;; + -okl|--pkokl) + paket_kur_liste "$2" ;; + -oklz) + paket_kur_liste_zorla "$2" ;; + -kh) + local templist + templist=`mktemp` + ls *.mps.lz > $templist + mps -okz -H $templist ;; + -ko|--pkko) + paket_kur_oto2 "$2" ;; + -kuruld) + paket_inkur_liste_direk "$2" ;; + -kurul) + paket_inkur_liste "$2" ;; + -kur) + paket_inkur_oto "$2" ;; + kur) + if [[ "$2" == "py-"* ]]; then + pypaket=`echo "$2" | cut -d'-' -f 2` + echo $pypaket "pip2 ile kurulacak" + pip install $pypaket + exit 1 + fi + if [[ "$2" == "py3-"* ]]; then + pypaket=`echo "$2" | cut -d'-' -f 2` + echo $pypaket "pip3 ile kurulacak" + pip3 install $pypaket + exit 1 + fi + if [[ "$2" == *"mps.lz"* ]]; then + if [ "$3" == "-kok" ] && [ -d "$4" ]; then + kokdizin="$4" + tekrarkur="evet" + fi + ikaynak="yerel" + else + paket_inkur_oto "$2" + fi ;; + gitkur) + git_proje_kur "$2" ;; + kurkos) + local pkt + pkt="`find $talimatname_dizin -name $2`" + if [ -f $pkt/$2.kur-kos ];then + bash $pkt/$2.kur-kos + else + ryaz 31 "$2 kur-kos yok!" + fi ;; + koskur) + local pkt + pkt="`find $talimatname_dizin -name $2`" + if [ -f $pkt/$2.kos-kur ];then + bash $pkt/$2.kos-kur + else + ryaz 31 "$2 kos-kur yok!" + fi ;; + silkos) + local pkt + pkt="`find $talimatname_dizin -name $2`" + if [ -f $pkt/$2.sil-kos ];then + bash $pkt/$2.sil-kos + else + ryaz 31 "$2 kur-kos yok!" + fi ;; + kossil) + local pkt + pkt="`find $talimatname_dizin -name $2`" + if [ -f $pkt/$2.kos-sil ];then + bash $pkt/$2.kos-sil + else + ryaz 31 "$2 kur-kos yok!" + fi ;; + -kdl) + if [ ! "$2" ]; then + ryaz 31 "paket ismi eksik" + exit 1 + fi + kurulum_dosya_listele "$2" ;; + -pak|--paketle) + if [ ! "$2" ]; then + ryaz 31 "paketlenecek dizin ismi eksik" + exit 1 + fi + yeniden_paketle "$2" ;; + -psk|--paksiskur) + if [ ! "$2" ]; then + ryaz 31 "paket liste yok" + exit 1 + fi + if [ ! "$3" ]; then + ryaz 31 "hedef dizin yok" + exit 1 + fi + sistem_kur "$2" "$3" ;; + -po) + pvt_olustur ;; + -os|--pkos) + if [ ! "$2" ]; then + ryaz 31 "silme listesi yok" + exit 1 + fi + paket_sil_oto "$2" ;; + -kl|--kurulu-liste) + ls $VT ;; + -dly|--drly) + if [ -f tumbag.liste ];then + mv tumbag.liste tumbag.liste.eski + fi + if [ -f bag.liste ];then + mv bag.liste bag.liste.eski + fi + touch tumbag.liste + touch bag.liste + derleme_listyap "$2" ;; + -dlb|--drlb) + derleme_listbilgi "$2";; + -b|--pkbl) + paket_bilgi "$2" ;; + #sunucu bilgisi alma + -sun|--sunucu) + ryaz 32 $sunucu ;; + -bb|--pkbb) + bagimli_bilgi "$2" | column -t;; + -tb|--pktb) + ters_bagimli "$2" ;; + -tbk|--pktbk) + ters_bagimli_kontrol "$2" ;; + -talb|--talb) + talimat_bilgi "$2" | column -t;; + -to) + if [ ! "$2" ]; then + ryaz 31 "talimat ismi eksik" + exit 1 + fi + talimat_olustur "$2" ;; + guncelle) + mps -GG && mps -G ;; + -Ggit|-GG) + git_guncelle ;; + -G|--pvtg) + paketvt_guncelle + mps -kudo ;; + #komple kurulu sistemin guncellenmesi + -GS) + sistem_guncelle ;; + #tekil paket guncelleme-single package updating + -g|--pkgu) + if [ ! "$2" ]; then + ryaz 31 "paket ismi eksik" + exit 1 + fi + paket_guncelle "$2";; + #bagimliliklariyla beraber paket guncelleme-package updating with depencies + -go|--pkgo) + if [ ! "$2" ]; then + ryaz 31 "paket ismi eksik" + exit 1 + fi + paket_guncelle_oto "$2";; + -kk|--kurulu-kontrol) + if [ ! "$2" ]; then + ryaz 31 "paket ismi eksik" + exit 1 + fi + ryaz 31 `kurulu_kontrol "$2"`;; + -kudo) + kurulum_dogrulama ;; + -kdk) + kurban_kurtar $2 ;; + -suko) + sunucu_kontrol ;; + -dota) + dosyadan_talimat_islem $2 ;; + -cf|--config-file) + if [ ! "$2" ]; then + echo "ayardosyası gerek $1" + exit 1 + fi + ayar_dosyasi="$2" + shift ;; + -tro) + tarihce_yap ;; + -trot) + temel_tarihce="evet" + tarihce_yap ;; + -try) + if [ ! "$2" ]; then + ryaz 31 "tarihce dosyasi eksik $1" + exit 1 + fi + tarihce_yukle "$2" + shift ;; + -trl) + tarihce_liste ;; + -trs) + if [ ! "$2" ]; then + ryaz 31 "parametre eksik $1" + exit 1 + fi + tarihce_sil "$2" + shift ;; + -v) + ryaz 33 "$betikad $versiyon $iletisim" + exit 0 ;; + -h|--help) + yardim + exit 0 ;; + + esac + shift + done +} + +yardim() { + cat <<_EOF + +$betikad $versiyon Milis Paket Sistemi + +Secenekler: + -G ikili paket veritabanını günceller + -Ggit git sunucusundan talimatname ve sistem gunceller + -kur paket_ismi ilgili paketi bagimliliklariyla agdan cekip kurar + -s paket_ismi ilgili paketi kaldirir + -k paket_ismi yereldeki paketi bagimliliksiz kurar + -kl kurulu paket listesini verir + -kk paket_ismi ilgili paketin kurulu olma durumunu verir + -d paket_ismi ilgili paketin talimat dosyasına göre + sadece derler,paketler + -derle paket_ismi ilgili paketin talimat dosyasına göre bagimliliklariyla + beraber derler,paketler ve kurar. + +_EOF + exit 1 +} + +ana(){ +if [ `id -u` = 0 ] ; then + ayarlar "$@" + + if [ "$ikaynak" = "ag" ]; then + local kontroldeg + kkont=`kurulu_kontrol "$2"` + if [ "$kkont" = "degil" ] || [ "$tekrarkur" = "evet" ];then + pkt=`cat "$paketdepo""paket.vt" | grep "^$2 " | cut -d' ' -f3` + if [ ! -z "$pkt" -a "$pkt" != "" ]; then + cpaket="${pkt/'#'/'%23'}" + ryaz 33 "agdan cekiliyor:" "$2" + #paket sunucuda varsa + wget -q --spider "$sunucu$cpaket" + #if wget -P /tmp -q "$sunucu$cpaket" > /dev/null; then + if [ $? -eq 0 ]; then + #wget -P "$paketdepo" "$sunucu$cpaket" + paket_indir "$2" + + if [ "$kurulum_onay" = "evet" ];then + if [ "$tekrarkur" = "evet" ];then + paket_sil "$2" "evet" + fi + icerik_ekle "$paketdepo$pkt" + exit 1 + fi + else + ryaz 31 "paket sunucuda yok!" + fi + else + ryaz 31 "paket sunucuda yok!( mps -G komutuyla güncelleme yapınız. )" + fi + else + ryaz 32 "$2 paketi zaten kurulu!" + fi + exit 1 + fi + + if [ "$ikaynak" = "yerel" ]; then + local silme + pkontrol=`basename $2 | grep -w "mps.lz"` + if [ ! -z "$pkontrol" -a "$pkontrol" != "" ]; then + paketad=`echo "$2" | cut -d'#' -f1` + kkont=`kurulu_kontrol "$paketad"` + if [ "$kkont" = "degil" ];then + icerik_ekle "$2" + else + echo $tekrarkur + if [ "$tekrarkur" = "hayir" ];then + while true; do + ryaz 31 "$2 paketi zaten kurulu silinip kurulsun mu?" + read -p "e veya h -> " eh + case $eh in + [Ee]* ) silme="e"; break;; + [Hh]* ) break;; + * ) echo "e veya h";; + esac + done + fi + if [ "$silme" = "e" ];then + ryaz 33 "silinecekelerin kontrolu için" + paket_sil "$paketad" + icerik_ekle "$2" + fi + fi + else + ryaz 31 "yerelde mps paketi bulunamadı." + fi + fi +else + sudo mps "$@" +fi +} +ana "$@" + + +#31 kirmizi +#32 yesil +#33 sari +#34 mavi +#34 mor diff --git a/mps-0.8/mpsd b/mps-0.8/mpsd new file mode 100755 index 000000000..90a24465a --- /dev/null +++ b/mps-0.8/mpsd @@ -0,0 +1,1540 @@ +#!/bin/bash + +# error codes +E_GENERAL=1 +E_TALIMAT=2 # hatalı talimat +E_DIR_PERM=3 # (source/build) directory missing or missing read/write permission +E_DOWNLOAD=4 # error during download +E_UNPACK=5 # error during unpacking of source file(s) +E_MD5=6 # md5sum verification failed +E_FOOTPRINT=7 # footprint check failure +E_BUILD=8 # error while running 'build()' +E_INSTALL=9 # error while installing the package via 'pkgadd' +E_DEPS=10 # error while searching runtime deps via 'pkginfo -b' + +info() { + echo "=======> $1" +} +warning() { + info "UYARI: $1" >&2 +} +error() { + info "HATA: $1" >&2 +} +abort_on_build() { + error $1 + exit $E_BUILD +} +get_filename() { + if [[ $1 =~ ^(http|https|ftp|file)://.*/(.+) ]]; then + echo "$DERLEME_KAYNAKDIZIN/${BASH_REMATCH[2]}" + else + echo $1 + fi +} +get_basename() { + local FILE="`echo $1 | sed 's|^.*://.*/||g'`" + echo $FILE +} +check_pkgfile() { + local NAME_TEST + if [ "${name}" == "" ]; then + error "Variable 'name' not initiated or not found in $PKGMK_PKGFILE." + exit $E_TALIMAT + elif [ "`type -t build`" != "function" ]; then + error "Function 'build' not specified in $PKGMK_PKGFILE." + exit $E_TALIMAT + fi + NAME_TEST=`echo "${name}" | sed 's@[[a-z0-9]*[-_+]*]*@@g'` + if [ "$NAME_TEST" != "" ]; then + error "Variable 'name' contains illegal characters: $NAME_TEST" + exit $E_TALIMAT + fi + if [ ${#name} -gt 50 ];then + error "Variable 'name' length higher then 50 characters." + exit $E_TALIMAT + fi + if [ "${version}" == "" ]; then + error "'versiyon' degeri $PKGMK_PKGFILE dosyası içinde yok veya tanımlı degil." + exit $E_TALIMAT + fi + if [ "$SURUM_YOKSAY" = "yok" ]; then + if [ "${release}" == "" ]; then + error " 'release' degeri $PKGMK_PKGFILE dosyası içinde yok veya tanımlı degil." + exit $E_TALIMAT + fi + fi + + +} +get_package_name() { + local NAME EXT + if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then + EXT=$PKT_UZANTISI + else + EXT=$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU + fi + #eski + #NAME=`echo $1|sed "s/i686.$EXT//"|sed "s/x86_64.$EXT//"|sed "s/any.$EXT//"` + #echo "${NAME:0:$((${#NAME} - 10 ))}" + NAME=`echo "$1" | cut -d'#' -f1` + echo "$NAME" +} +get_package_builddate() { + local NAME BUILD_DATE EXT + if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then + EXT=$PKT_UZANTISI + else + EXT=$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU + fi + NAME="`get_package_name $1`" + BUILD_DATE=`echo $1|sed "s/i686.$EXT//"|sed "s/x86_64.$EXT//"|sed "s/any.$EXT//"` + echo "${BUILD_DATE:$((${#NAME}))}" +} +get_package_extension() { + local EXTENSION + if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then + EXTENSION=".$PKT_UZANTISI" + else + EXTENSION=".$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU" + fi + echo $EXTENSION +} +get_package_arch() { + local NAME BUILD_DATE EXTENSION + NAME=`get_package_name $1` + BUILD_DATE=`get_package_builddate $1` + EXTENSION=`get_package_extension $1` + echo $1|sed "s/$NAME$BUILD_DATE//"|sed "s/$EXTENSION//" +} +check_directory() { + if [ ! -d $1 ]; then + error "Directory '$1' does not exist." + exit $E_DIR_PERM + elif [ ! -w $1 ]; then + error "Directory '$1' not writable." + exit $E_DIR_PERM + elif [ ! -x $1 ] || [ ! -r $1 ]; then + error "Directory '$1' not readable." + exit $E_DIR_PERM + fi +} +check_file() { + if [ -e $1 ] && [ ! -w $1 ]; then + error "File '$1' is not writable." + exit $E_GENERAL + fi +} +downloads_file_with_curl() { + if [ ! "`type -p curl`" ]; then + error "Command 'curl' not found." + exit $E_GENERAL + fi + DOWNLOAD_OPTS="--ftp-pasv --retry 3 --retry-delay 3 \ + -R -o $1 --fail -#" + + error=1 + + curl $DOWNLOAD_OPTS $2 + error=$? + if [ $error != 0 ]; then + error "İndiriliyor '$2' başarısız." + exit $E_DOWNLOAD + fi +} +download_file() { + info "İndiriliyor '$1'." + + LOCAL_FILENAME=`get_filename $1` + + if [ ! "`type -p wget`" ]; then + warning "Command 'wget' not found." + info "You should install 'wget' as soon as possible, trying with curl ..." + downloads_file_with_curl $LOCAL_FILENAME $1 + else + LOCAL_FILENAME_PARTIAL="$LOCAL_FILENAME.partial" + DOWNLOAD_OPTS="--passive-ftp --no-directories --tries=3 --waitretry=3 \ + --directory-prefix=$DERLEME_KAYNAKDIZIN \ + --output-document=$LOCAL_FILENAME_PARTIAL --no-check-certificate" + + if [ -f "$LOCAL_FILENAME_PARTIAL" ]; then + info "Kısmi indirme var,tamamlanmaya çalışılacak" + RESUME_CMD="-c" + fi + + error=1 + + BASENAME=`get_basename $1` + for REPO in ${PKGMK_SOURCE_MIRRORS[@]}; do + REPO="`echo $REPO | sed 's|/$||'`" + wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $REPO/$BASENAME + error=$? + if [ $error == 0 ]; then + break + fi + done + + if [ $error != 0 ]; then + while true; do + wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $1 + error=$? + if [ $error != 0 ] && [ "$RESUME_CMD" ]; then + info "Partial download failed, restarting" + rm -f "$LOCAL_FILENAME_PARTIAL" + RESUME_CMD="" + else + break + fi + done + fi + + if [ $error != 0 ]; then + error "İndiriliyor '$1' başarısız." + exit $E_DOWNLOAD + fi + + mv -f "$LOCAL_FILENAME_PARTIAL" "$LOCAL_FILENAME" + fi +} +download_source() { + local FILE LOCAL_FILENAME + + for FILE in ${source[@]}; do + LOCAL_FILENAME=`get_filename $FILE` + if [ ! -e $LOCAL_FILENAME ]; then + if [ "$LOCAL_FILENAME" = "$FILE" ]; then + error "Source file '$LOCAL_FILENAME' not found (can not be downloaded, URL not specified)." + exit $E_DOWNLOAD + else + if [ "$PKGMK_DOWNLOAD" = "evet" ]; then + download_file $FILE + else + error "Source file '$LOCAL_FILENAME' not found (use option -d to download)." + exit $E_DOWNLOAD + fi + fi + fi + done +} +remove_source() { + local FILE LOCAL_FILENAME + for FILE in ${source[@]}; do + LOCAL_FILENAME=`get_filename $FILE` + if [ -e $LOCAL_FILENAME ] && [ "$LOCAL_FILENAME" != "$FILE" ]; then + info "Removing $LOCAL_FILENAME" + rm -f $LOCAL_FILENAME + fi + done +} +unpack_source() { + local FILE LOCAL_FILENAME COMMAND + + for FILE in ${source[@]}; do + LOCAL_FILENAME=`get_filename $FILE` + case $LOCAL_FILENAME in + *.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm) + if [ "$PKGMK_IGNORE_UNPACK" != "evet" ];then + COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME" + else + COMMAND="cp $LOCAL_FILENAME $SRC" + fi ;; + *) + COMMAND="cp $LOCAL_FILENAME $SRC" ;; + esac + + echo "$COMMAND" + + $COMMAND + + if [ $? != 0 ]; then + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + error "'$TARGET' derlenmesi basarisiz." + exit $E_UNPACK + fi + done +} +get_package_list() { + local ARCHFILE i + i=0 + for ARCH in x86_64 i686 any; do + for FILE in `find $PKGMK_PACKAGE_DIR -name "${name}*$ARCH.$PKT_UZANTISI*"`; do + TARGETS[i]=`basename $FILE` + i=$((i+1)) + done + done +} +make_md5sum() { + local FILE LOCAL_FILENAMES + + if [ "$source" ]; then + for FILE in ${source[@]}; do + LOCAL_FILENAMES="$LOCAL_FILENAMES `get_filename $FILE`" + done + + md5sum $LOCAL_FILENAMES | sed -e 's| .*/| |' | sort -k 2 + fi +} + +make_footprint() { +if ! (echo $TARGET| grep "kernel" >/dev/null); then + pkginfo --footprint $TARGET | \ + sed "s|\tlib/modules/`uname -r`/|\tlib/modules//|g" | \ + sort -k 3 +else + pkginfo --footprint $TARGET | sort -k 3 +fi +} + +check_md5sum() { + local FILE="$DERLEME_SANTIYE/.tmp" + + cd $PKGMK_ROOT + + if [ -f $PKGMK_MD5SUM ]; then + make_md5sum > $FILE.md5sum + sort -k 2 $PKGMK_MD5SUM > $FILE.md5sum.orig + diff -w -t -U 0 $FILE.md5sum.orig $FILE.md5sum | \ + sed '/^@@/d' | \ + sed '/^+++/d' | \ + sed '/^---/d' | \ + sed 's/^+/NEW /g' | \ + sed 's/^-/MISSING /g' > $FILE.md5sum.diff + if [ -s $FILE.md5sum.diff ]; then + error "Md5sum mismatch found:" + cat $FILE.md5sum.diff >&2 + + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + + if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then + error "Md5sum not ok." + exit $E_MD5 + fi + + error "'$TARGET' derleme basarisiz." + exit $E_MD5 + fi + else + if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + info "Md5sum not found." + exit $E_MD5 + fi + + warning "Md5sum not found, creating new." + make_md5sum > $PKGMK_MD5SUM + fi + + if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + info "Md5sum ok." + exit 0 + fi +} + +strip_files() { + local FILE FILTER + + cd $PKG + + if [ -f $PKGMK_ROOT/$PKGMK_NOSTRIP ]; then + FILTER="grep -v -f $PKGMK_ROOT/$PKGMK_NOSTRIP" + else + FILTER="cat" + fi + + find . -type f -printf "%P\n" | $FILTER | while read FILE; do + case $(file -b "$FILE") in + *ELF*executable*not\ stripped) + strip --strip-all "$FILE" + ;; + *ELF*shared\ object*not\ stripped) + strip --strip-unneeded "$FILE" + ;; + current\ ar\ archive) + strip --strip-debug "$FILE" + esac + done +} + +compress_manpages() { + local FILE DIR TARGET + + cd $PKG + + find . -type f -path "*/share/man*/*" | while read FILE; do + if [ "$FILE" = "${FILE%%.gz}" ]; then + gzip -9 "$FILE" + fi + done + + find . -type l -path "*/share/man*/*" | while read FILE; do + TARGET=`readlink -n "$FILE"` + TARGET="${TARGET##*/}" + TARGET="${TARGET%%.gz}.gz" + rm -f "$FILE" + FILE="${FILE%%.gz}.gz" + DIR=`dirname "$FILE"` + + if [ -e "$DIR/$TARGET" ]; then + ln -sf "$TARGET" "$FILE" + fi + done + find . -type f -path "*/share/info/*" | while read FILE; do + if [ "$FILE" = "${FILE%%.gz}" ]; then + gzip -9 "$FILE" + fi + done + find . -type l -path "*/share/info/*" | while read FILE; do + TARGET=`readlink -n "$FILE"` + TARGET="${TARGET##*/}" + TARGET="${TARGET%%.gz}.gz" + rm -f "$FILE" + FILE="${FILE%%.gz}.gz" + DIR=`dirname "$FILE"` + + if [ -e "$DIR/$TARGET" ]; then + ln -sf "$TARGET" "$FILE" + fi + done +} + +check_footprint() { + local TARGET FILE="$DERLEME_SANTIYE/.tmp" + + cd $PKGMK_PACKAGE_DIR + if [ -z $TARGETS ]; then + get_package_list + if [ -z $TARGETS ]; then + error "Unable to update footprint" + fi + fi + for TARGET in ${TARGETS[@]}; do + if [ -f $TARGET ]; then + PKGMK_FOOTPRINT="`get_package_name $TARGET`".footprint + make_footprint > $FILE.footprint + if [ -f $PKGMK_FOOTPRINT ]; then + sort -k 3 $PKGMK_FOOTPRINT > $FILE.footprint.orig + diff -w -t -U 0 $FILE.footprint.orig $FILE.footprint | \ + sed '/^@@/d' | \ + sed '/^+++/d' | \ + sed '/^---/d' | \ + sed 's/^+/NEW /g' | \ + sed 's/^-/MISSING /g' > $FILE.footprint.diff + if [ -s $FILE.footprint.diff ]; then + if [ "$PKGMK_IGNORE_NEW" = "evet" ]; then + mv $FILE.footprint $PKGMK_FOOTPRINT + warning "Footprint mismatch found:" + else + error "Footprint mismatch found:" + BUILD_SUCCESSFUL="yok" + fi + cat $FILE.footprint.diff >&2 + fi + else + warning "Footprint not found, creating new." + mv $FILE.footprint $PKGMK_FOOTPRINT + fi + else + error "Package '$TARGET' was not found." + BUILD_SUCCESSFUL="yok" + fi + done +} + +make_work_dir() { + export PKG="$DERLEME_SANTIYE/pkg" + export SRC="$DERLEME_SANTIYE/src" + + umask 022 + + cd $PKGMK_ROOT + remove_work_dir + mkdir -p $SRC $PKG + + if [ "$MD5SUM_YOKSAY" = "yok" ]; then + check_md5sum + fi +} + +remove_work_dir() { + rm -rf $DERLEME_SANTIYE +} +pack_lib() { + local DIR SUBDIR + for DIR in usr opt/*; do + for SUBDIR in lib lib64; do + if [ -d $DIR/$SUBDIR/pkgconfig ]; then + mv $DIR/$SUBDIR/pkgconfig $PKG + fi + if [ -d $DIR/$SUBDIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-${PKGMK_ARCH}.${PKT_UZANTISI} \ + $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" + rm -r $DIR/$SUBDIR + j=1 + fi + if [ -d $PKG/pkgconfig ]; then + mkdir $DIR/$SUBDIR + mv $PKG/pkgconfig $DIR/$SUBDIR/pkgconfig + fi + done + done +} +remove_lib() { + local DIR SUBDIR + for DIR in usr opt/*; do + for SUBDIR in lib lib64;do + if [ -d $DIR/$SUBDIR ]; then + rm -r $DIR/$SUBDIR + fi + done + done +} +pack_devel() { + local DIR SUBDIR + for DIR in usr opt/*; do + for SUBDIR in include lib/pkgconfig; do + if [ -d $DIR/$SUBDIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ + $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" + rm -r $DIR/$SUBDIR + j=1 + + fi + done + done +} +remove_devel() { + local DIR SUBDIR + for DIR in usr opt/*; do + for SUBDIR in include lib/pkgconfig; do + if [ -d $DIR/$SUBDIR ]; then + rm -r $DIR/$SUBDIR + fi + done + done +} +pack_doc() { + local DIR SUBDIR + for DIR in usr/share opt/*/share; do + for SUBDIR in doc gtk-doc; do + if [ -d $DIR/$SUBDIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ + $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" + j=1 + fi + done + done +} +remove_doc() { + local DIR SUBDIR + for DIR in usr/share opt/*/share; do + for SUBDIR in doc gtk-doc; do + if [ -d $DIR/$SUBDIR ]; then + rm -r $DIR/$SUBDIR + fi + done + done +} +pack_man() { + local DIR SUBDIR + for DIR in usr/share opt/*/share; do + for SUBDIR in info man; do + if [ -d $DIR/$SUBDIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ + $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" + j=1 + fi + done + done +} +remove_man() { + local DIR SUBDIR + for DIR in usr/share opt/*/share; do + for SUBDIR in info man; do + if [ -d $DIR/$SUBDIR ]; then + rm -r $DIR/$SUBDIR + fi + done + done +} +pack_service() { + local DIR="etc/rc.d" + if [ -d $DIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ + $DIR || BUILD_SUCCESSFUL="yok" + j=1 + fi +} +remove_service() { + local DIR="etc/rc.d" + if [ -d $DIR ]; then + rm -r $DIR + fi +} +add_meta_files() { + local NAME + NAME="`get_package_name $1`" + cd $PKG + if [ -f $PKGMK_ROOT/${NAME}.okubeni ]; then + cp $PKGMK_ROOT/${NAME}.okubeni .README + fi + if [ -f $PKGMK_ROOT/${NAME}.kos-kur ]; then + cp $PKGMK_ROOT/${NAME}.kos-kur .PRE + fi + if [ -f $PKGMK_ROOT/${NAME}.kur-kos ]; then + cp $PKGMK_ROOT/${NAME}.kur-kos .POST + fi + for file in .README .PRE .POST; do + if [ -f $file ]; then + bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 \ + $file + rm $file + fi + done +} + +add_meta_to_archive() { + local NAME TAR SIZE_I DESC URL PACK MAINT ARCH + NAME="`get_package_name $1`" + ARCH="`get_package_arch $1`" + + info "$NAME arşivine üstbilgiler ekleniyor." + + TAR="$DERLEME_SANTIYE/tar" + mkdir -p $TAR + cd $TAR + + bsdtar xf $PKGMK_PACKAGE_DIR/$1 + + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^desc|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + DESC="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^desc|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" + else + DESC="n.a" + fi + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^pack|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + PACK="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^pack|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" + else + PACK="n.a" + fi + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^maint|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + MAINT="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^maint|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" + else + MAINT="n.a" + fi + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^url|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + URL="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^url|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" + else + URL="n.a" + fi + SIZE_I="`du -b $PKGMK_PACKAGE_DIR/$1|sed "s/\t/ /"|cut -d " " -f1`" + echo "N$NAME" > .META + echo "D$DESC" >> .META + echo "U$URL" >> .META + echo "M$MAINT" >> .META + echo "P$PACK" >> .META + echo "S$SIZE_I" >> .META + echo "V$version" >> .META + echo "r$release" >> .META + echo "B$PKGMK_BUILDVER" >> .META + echo "a$ARCH" >> .META + # TODO improve the pkginfo --runtimedepfiles functionnality + if [ "$PKGMK_IGNORE_RUNTIMEDEPS" == "yok" ];then + for dep in `pkginfo --runtimedepfiles $TAR|grep -v ^[A-Z]`; do + echo "R$dep" >> .META + done + # We don't want any .devel dependencies here + sed -i '/^R[[a-z0-9]*[-_+]*]*\.devel/d' .META + if [ ! -z $run ] && [ "$NAME" == "$name" ]; then + info "Adding runtime deps to Archive $NAME" + for rd in ${run[@]}; do + if [ "`pkginfo -b $rd`" == "0" ] || [ "`pkginfo -b $rd`" == "" ]; then + error "Runtime dependencie $rd not found, cannot continue" + clean + exit $E_DEPS; + fi + echo "R$rd`pkginfo -b $rd`" >> .META + done + fi + if [ -f $PKGMK_ROOT/${NAME}.run ]; then + info "Adding runtime deps to Archive $NAME" + for rd in `cat $PKGMK_ROOT/${NAME}.run`; do + if [ "`pkginfo -b $rd`" == "0" ] || [ "`pkginfo -b $rd`" == "" ]; then + error "Runtime dependencie $rd not found, cannot continue" + clean + exit $E_DEPS; + fi + echo "R$rd`pkginfo -b $rd`" >> .META + done + fi + fi + bsdtar -tf $PKGMK_PACKAGE_DIR/$1 > .MTREE + + rm $PKGMK_PACKAGE_DIR/$1 + + for file in .META .MTREE .README .PRE .POST .INFO; do + if [ -f $file ]; then + bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 \ + $file + fi + done + + bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 * + + cd .. + rm -rf $TAR +} + +compress_archive() { + info "$1 sıkıştırılıyor." + case $PKT_SIKISTIRMA_MODU in + lz) lzip -9 $1;; + gz) gzip -9 $1;; + bz2) bzip2 -9 $1;; + xz) xz -z -9 $1;; + esac +} + +derle() { + if [ "$PAKETSIZ_DERLEME" = "evet" ]; then + paketsiz_derle + else + build_package + fi + +} + +paketsiz_derle() { + local BUILD_SUCCESSFUL="yok" + + export PKG="/" + export SRC="$DERLEME_SANTIYE/src" + umask 022 + + cd $PKGMK_ROOT + rm -rf $DERLEME_SANTIYE + mkdir -p $SRC + + info "derleniyor... '$TARGET'" + + if [ "$PKGMK_DOWNLOAD" = "evet" ]; then + download_source + fi + unpack_source + + cd $SRC + (set -e -x ; build) + + +# cd $PKG + + if [ $? = 0 ]; then + BUILD_SUCCESSFUL="evet" + + fi + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + + if [ "$BUILD_SUCCESSFUL" = "evet" ]; then + info " '$TARGET' derleme basarili" + else + if [ -f $TARGET ]; then + touch -r $PKGMK_ROOT/$PKGMK_PKGFILE $TARGET &> /dev/null + fi + error " '$TARGET' derleme basarisiz" + exit 1 + fi +} + +build_package() { + # TODO find a better solution for the hardcoded folders + local BUILD_SUCCESSFUL="yok" + if [ "$1" != "$TARGET" ]; then + if [ ! -z $TARGETS ]; then + for TARGET in ${TARGETS[@]}; do + error "$TARGET should be remove" + done + error "Remove the binaries first..." + exit $E_BUILD + fi + fi + + check_file "$TARGET" + make_work_dir + + if [ "$UID" != "0" ]; then + warning "Packages should be built as root." + fi + + info "Building '$TARGET'." + + unpack_source + + cd $SRC + (set -e -x ; build) + + if [ $? = 0 ]; then + if [ "$PKGMK_NO_STRIP" = "yok" ]; then + strip_files + fi + + compress_manpages + + cd $PKG + i=0 + j=0 + for group in ${PAKET_GRUPLAR[@]}; do + BUILD_SUCCESSFUL="evet" + if [ "`type -t ${group}`" == "function" ]; then + (set -e -x ;${group}) + j=1 + if [ $? = 0 ]; then + BUILD_SUCCESSFUL="evet" + else + error "Building '$TARGET' failed." + exit $E_BUILD + fi + else + if [ "$1" != "$TARGET" ]; then + if [ -f $PKGMK_PACKAGE_DIR/${name}.${group}#$version-* ]; then + rm $PKGMK_PACKAGE_DIR/${name}.${group}#$version-}* + fi + pack_${group} + fi + remove_${group} + if [ "$BUILD_SUCCESSFUL" == "yok" ]; then + error "Building '$TARGET' failed." + exit $E_BUILD + fi + fi + # Add the meta in each package + if [ $j == 1 ]; then + if [ "$BUILD_SUCCESSFUL" == "yok" ]; then + error "Building '$TARGET' failed." + exit $E_BUILD + fi + j=0 + fi + j=0 + done + #dil desteginin eklenmesi-geri kalanın temizlenmesi + #if [ ! "$PAKET_LOKAL" == "hepsi" ];then + # local lokaldizin + # if [ -d usr/share/locale ];then + # lokaldizin="usr/share/locale" + # fi + # if [ -d opt/*/usr/share/locale ];then + # lokaldizin="opt/*/usr/share/locale" + # fi + # for DIR in `ls $lokaldizin` ; do + # if [[ "$PAKET_LOKAL" == *"$DIR"* ]]; then + # echo $DIR "dil paketi ekleniyor" + # else + # rm -rf $lokaldizin/$DIR + # fi + # done + #fi + + if [ "`ls|wc -l`" != "0" ]; then + bsdtar -r -f $PKGMK_PACKAGE_DIR/${name}#$version-${PKGMK_ARCH}.${PKT_UZANTISI} * + else + error "No files found in $PKG..." + exit $E_BUILD + fi + if [ $? = 0 ]; then + BUILD_SUCCESSFUL="evet" + if [ "$DOSYAIZLEME_YOKSAY" == "evet" ]; then + warning "dosyaizleme pas gecildi." + else + check_footprint + fi + fi + fi + + if [ "$BUILD_SUCCESSFUL" = "evet" ]; then + + if [ "$1" != "$TARGET" ]; then + get_package_list + if [ -z $TARGETS ]; then + error "Paket(ler) bulunamadı..." + exit $E_BUILD + fi + for TARGET in ${TARGETS[@]}; do + + add_meta_files $TARGET + add_meta_to_archive $TARGET + done + else + add_meta_files `basename $TARGET` + add_meta_to_archive `basename $TARGET` + fi + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + remove_work_dir + fi + else + if [ -f $TARGET ]; then + touch -r $PKGMK_ROOT/$PKGMK_PKGFILE $TARGET &> /dev/null + fi + error "'$TARGET' derlenmesi başarısız." + exit $E_BUILD + fi + + + + + +} + +install_package() { + local COMMAND + get_package_list + if [ -z $TARGETS ]; then + error "kurulacak paket bulunamadı..." + exit $E_INSTALL + fi + for TARGET in ${TARGETS[@]}; do + if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ] || [ "`get_package_arch $TARGET`" = "any" ]; then + info "kuruluyor '$TARGET'." + + if [ "$DERLE_KUR" = "install" ]; then + COMMAND="mps -k $PKGMK_PACKAGE_DIR/$TARGET" + else + COMMAND="mps -k $PKGMK_PACKAGE_DIR/$TARGET" + fi + + cd $PKGMK_ROOT + echo "$COMMAND" + $COMMAND + + + if [ $? = 0 ]; then + info " '$TARGET' basarili sekilde kuruldu." + else + error " '$TARGET' kurulum basarisiz." + exit $E_INSTALL + fi + fi + done +} + +paket_kur() { + local COMMAND + get_package_list + if [ -z $TARGETS ]; then + error "kurulacak paket bulunamadı..." + exit $E_INSTALL + fi + for TARGET in ${TARGETS[@]}; do + if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ] || [ "`get_package_arch $TARGET`" = "any" ]; then + info "kuruluyor '$TARGET'." + + #paket_kurulum + + if [ "$PAKET_KURMA" = "evet" ]; then + COMMAND2="echo :::::::::::::::::::::::: $PKGMK_PACKAGE_DIR/$TARGET" + fi + + echo "$COMMAND2" + $COMMAND2 + + if [ "$DERLE_KUR" = "install" ]; then + COMMAND="pkgadd $PKGMK_PACKAGE_DIR/$TARGET" + else + COMMAND="pkgadd -u $PKGMK_PACKAGE_DIR/$TARGET" + fi + + cd $PKGMK_ROOT + echo "$COMMAND" + $COMMAND + + + if [ $? = 0 ]; then + info " '$TARGET' basarili sekilde kuruldu." + else + error " '$TARGET' kurulum basarisiz." + exit $E_INSTALL + fi + fi + done +} + +recursive() { + local ARGS FILE DIR + [ -f $REPO_DOSYASI ] && rm -v $REPO_DOSYASI + + ARGS=`echo "$@" | sed -e "s/--recursive//g" -e "s/-r//g"` + + for FILE in `find $PKGMK_ROOT -name $PKGMK_PKGFILE | sort`; do + DIR="`dirname $FILE`/" + if [ -d $DIR ]; then + info "Entering directory '$DIR'." + (cd $DIR && $PKGMK_COMMAND $ARGS) + info "Leaving directory '$DIR'." + fi + done +} +clean() { + unset TARGETS + get_package_list + if [ ! -z $TARGETS ]; then + for TARGET in ${TARGETS[@]}; do + if [ -f $PKGMK_PACKAGE_DIR/$TARGET ]; then + info "Removing $TARGET" + rm -f $PKGMK_PACKAGE_DIR/$TARGET + fi + done + else + warning "$TARGETS bulunamadı" + fi + find $PKGMK_ROOT -name "*.md5sum" -exec rm -v {} \; 2> /dev/null + find $PKGMK_ROOT -name "*.footprint" -exec rm -v {} \; 2> /dev/null + unset TARGETS +} +update_footprint() { + cd $PKGMK_PACKAGE_DIR + if [ -z $TARGETS ]; then + get_package_list + if [ -z $TARGETS ]; then + error "Package(s) not found(s), unable to update footprint." + exit $E_FOOTPRINT + fi + fi + for TARGET in ${TARGETS[@]}; do + if [ ! -f $TARGET ]; then + error "Unable to update footprint. File '$TARGET' not found." + exit $E_FOOTPRINT + fi + PKGMK_FOOTPRINT="`get_package_name $TARGET`".footprint + check_file "$PKGMK_FOOTPRINT" + make_footprint > $PKGMK_FOOTPRINT + touch $TARGET + + info "Footprint updated for $TARGET" + done +} + +build_needed() { + local FILE RESULT + RESULT="evet" + if [ -f $TARGET ]; then + RESULT="yok" + FILE=`get_filename $PKGMK_PKGFILE` + if [ ! -e $FILE ] || [ ! $TARGET -nt $FILE ]; then + RESULT="evet" + break + fi + fi + echo $RESULT +} + +update_collection_repo() +{ + local HEAD BUILD_DATE RELEASE DESCRIPTION URL MAINTAINER PACKAGER EXTENSION + if [ -f $REPO_DOSYASI ]; then + HEAD=`head -1 $REPO_DOSYASI` + if [ "${HEAD:10:1}" = "#" ]; then + BUILD_DATE="`echo $HEAD|cut -d "#" -f1`" + EXTENSION="`echo $HEAD|cut -d "#" -f2`" + VERSION="`echo $HEAD|cut -d "#" -f3`" + RELEASE="`echo $HEAD|cut -d "#" -f4`" + DESCRIPTION="`echo $HEAD|cut -d "#" -f5`" + URL="`echo $HEAD|cut -d "#" -f6`" + MAINTAINER="`echo $HEAD|cut -d "#" -f7`" + PACKAGER="`echo $HEAD|cut -d "#" -f8`" + [ -f ../$REPO_DOSYASI ] && sed -i "/#$name#/d" ../$REPO_DOSYASI + echo "`md5sum $REPO_DOSYASI|cut -d " " -f1`#$BUILD_DATE#$name##$version-#$RELEASE#$DESCRIPTION#$URL#$MAINTAINER#$PACKAGER#$EXTENSION" \ + >> ../$REPO_DOSYASI + fi + fi +} +update_repo() +{ + local FILE MD5SUM EXT + cd $PKGMK_ROOT + get_package_list + if [ ! -z $TARGETS ]; then + EXT="`get_package_extension $TARGETS`" + echo -n "`get_package_builddate $TARGETS`#$EXT##$version-#$release" > $REPO_DOSYASI + for string in desc url maint pack; do + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^$string|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + echo -n "#"`cat $PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^$string|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`"" \ + >> .PKGREPO + else + echo -n "#n.a" >> .PKGREPO + fi + done + printf "\n" >> .PKGREPO + for TARGET in ${TARGETS[@]}; do + FILE=`basename $TARGET` + MD5SUM=`md5sum $TARGET|cut -d " " -f1` + echo "$MD5SUM#`get_package_name $TARGET`#`get_package_arch $TARGET|sed "s/-//"`" >> $REPO_DOSYASI + done + for FILE in ${name}* + do + [ ! -f "$FILE" ] && break + if [ "${FILE:$((${#FILE} - ${#EXT} ))}" != "$EXT" ]; then + echo "`md5sum $FILE|cut -d " " -f1`#$FILE" >> $REPO_DOSYASI + fi + done + else + rm -f $REPO_DOSYASI + fi + echo "`md5sum $PKGMK_PKGFILE|cut -d " " -f1`#$PKGMK_PKGFILE" >> $REPO_DOSYASI +} +clean_repo_files() +{ + cd $PKGMK_ROOT + if [ -f $REPO_DOSYASI ]; then + rm $REPO_DOSYASI + info "siliniyor $REPO_DOSYASI" + fi + if [ -f MD5SUM ]; then + rm MD5SUM + info "siliniyor MD5SUM" + fi +} +interrupted() { + echo "" + error "Interrupted." + + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + + exit $E_GENERAL +} + +print_help() { + echo "usage: `basename $PKGMK_COMMAND` [options]" + echo "options:" + echo " -i, --install build and install packages" + echo " -u, --upgrade build and install packages (as upgrade)" + echo " -r, --recursive search for and build packages recursively" + echo " -d, --download download missing source file(s)" + echo " -cv, --show-version-only do not build, only show the version of the port and exit" + echo " -do, --download-only do not build, only download missing source file(s)" + echo " -eo, --extract-only do not build, only extract source file(s)" + echo " -utd, --up-to-date do not build, only check if package is up to date" + echo " -ur, --update-repo do not build, only update the $REPO_DOSYASI file" + echo " -uc, --update-collection do not build, only update the $REPO_DOSYASI file of the collection means from the parent directory" + echo " -uf, --update-footprint update footprint using result from last build" + echo " -ic, --ignore-collection build packages without update the $REPO_DOSYASI file of the collection means from the parent directory" + echo " -if, --ignore-footprint build packages without checking footprint" + echo " -in, --ignore-new build packages, ignore new files in a footprint missmatch" + echo " -um, --update-md5sum update md5sum" + echo " -im, --ignore-md5sum build packages without checking md5sum" + echo " -cm, --check-md5sum do not build, only check md5sum" + echo " -ns, --no-strip do not strip executable binaries or libraries" + echo " -f, --force build packages even if it appears to be up to date" + echo " -co, --clean-only do not build, only remove packages and downloaded files, update $REPO_DOSYASI file" + echo " -kw, --keep-work keep temporary working directory" + echo " -cf, --config-file use alternative configuration file" + echo " -v, --version print version and exit " + echo " -h, --help print help and exit" +} +parse_options() { + while [ "$1" ]; do + case $1 in + -i|--install) + DERLE_KUR="install" ;; + -pk|--pkur) + PAKET_KURMA="evet" ;; + -u|--upgrade) + DERLE_KUR="upgrade" ;; + -r|--recursive) + PKGMK_RECURSIVE="evet" ;; + -d|--download) + PKGMK_DOWNLOAD="evet" ;; + -do|--download-only) + PKGMK_DOWNLOAD="evet" + PKGMK_DOWNLOAD_ONLY="evet" ;; + -eo|--extract-only) + PKGMK_EXTRACT_ONLY="evet" ;; + -cv|--show-version-only) + PKGMK_SHOW_VERSION="evet";; + -utd|--up-to-date) + PKGMK_UP_TO_DATE="evet" ;; + -sk|--sd-kontrol) + SOZDIZIM_KONTROL="evet" ;; + -uc|--update-collection) + PKGMK_UPDATE_COLLECTION="evet";; + -ur|--update-repo) + PKGMK_UPDATE_REPO="evet" ;; + -uf|--update-footprint) + PKGMK_UPDATE_FOOTPRINT="evet" ;; + -if|--ignore-footprint) + DOSYAIZLEME_YOKSAY="evet" ;; + -in|--ignore-new) + PKGMK_IGNORE_NEW="evet" ;; + -um|--update-md5sum) + PKGMK_UPDATE_MD5SUM="evet" ;; + -im|--ignore-md5sum) + MD5SUM_YOKSAY="evet" ;; + -ic|--ignore-collection) + KOLEKSIYON_YOKSAY="evet" ;; + -ir|--ignore-repo) + REPO_YOKSAY="evet" ;; + -cm|--check-md5sum) + PKGMK_CHECK_MD5SUM="evet" ;; + -ns|--no-strip) + PKGMK_NO_STRIP="evet" ;; + -f|--force) + PKGMK_FORCE="evet" ;; + -co|--clean-only) + PKGMK_CLEAN_ONLY="evet" ;; + -kw|--keep-work) + PKGMK_KEEP_WORK="evet" ;; + -cf|--config-file) + if [ ! "$2" ]; then + echo "`basename $PKGMK_COMMAND`: option $1 requires an argument" + exit 1 + fi + DERLEME_AYARDOSYASI="$2" + shift ;; + -v|--version) + echo "`basename $PKGMK_COMMAND` (cards) $PKGMK_VERSION" + exit 0 ;; + -h|--help) + print_help + exit 0 ;; + *) + echo "`basename $PKGMK_COMMAND`: invalid option $1" + exit 1 ;; + esac + shift + done +} + +main() { + if [ -f /etc/noprofile ]; then + source /etc/noprofile + fi + + parse_options "$@" + + if [ ! -f $DERLEME_AYARDOSYASI ]; then + error "File '$DERLEME_AYARDOSYASI' not found." + exit $E_GENERAL + fi + . $DERLEME_AYARDOSYASI + PKGMK_ARCH=`uname -m` + + + + #if ! (`which pkginfo > /dev/null`); then + #warning "pkginfo NOT FOUND, footprint ignored." + DOSYAIZLEME_YOKSAY="evet" + #fi + local FILE TARGET + + name=`basename $PKGMK_ROOT` + + if [ "$PKGMK_RECURSIVE" = "evet" ]; then + recursive "$@" + exit 0 + fi + if [ ! -f $PKGMK_PKGFILE ]; then + error "File '$PKGMK_PKGFILE' not found." + exit $E_TALIMAT + fi + . $PKGMK_PKGFILE + + if [ -z $group ]; then + group="`echo $name | cut -d "-" -f1`" + fi + if [ "$group" == "$name" ]; then + unset group + fi + if [ -z "$version" ]; then + if [ ! -z "$group" ];then + if [ -f ../$group/$PKGMK_PKGFILE ];then + . ../$group/$PKGMK_PKGFILE + unset run + . $PKGMK_PKGFILE + else + warning "Variable 'version' not initiated or not found in $PKGMK_PKGFILE." + fi + else + warning "Variable 'version' not initiated or not found in $PKGMK_PKGFILE." + fi + fi + if [ "$PKGMK_SHOW_VERSION" == "evet" ]; then + echo "$version" + exit 0 + fi + info "DERLE_KUR: $DERLE_KUR" + info "PAKET_KURMA: $PAKET_KURMA" + info "DERLEME_SANTIYE: $DERLEME_SANTIYE" + info "DERLEME_KAYNAKDIZIN: $DERLEME_KAYNAKDIZIN" + + if [ "$DERLE_KUR" = "yok" ]; then + PKGMK_CLEAN="yok" + warning "TEMIZLIK PAS GECILDI." + else + info "PKGMK_KEEP_SOURCES: $PKGMK_KEEP_SOURCES" + info "PKGMK_CLEAN: $PKGMK_CLEAN" + fi + if [ "$PKGMK_CLEAN" != "yok" ]; then + DOSYAIZLEME_YOKSAY="evet" + MD5SUM_YOKSAY="evet" + warning "FOOTPRINT AND MD5SUM IGNORED" + else + if [ "$PKGMK_UPDATE_REPO" != "evet" ]; then + info "REPO_YOKSAY: $REPO_YOKSAY" + else + info "PKGMK_UPDATE_REPO: $PKGMK_UPDATE_REPO" + fi + info "DOSYAIZLEME_YOKSAY: $DOSYAIZLEME_YOKSAY" + info "MD5SUM_YOKSAY: $MD5SUM_YOKSAY" + fi + if [ "$REPO_YOKSAY" == "evet" ]; then + info "$REPO_DOSYASI dosyası silenecek" + fi + + info "PKT_SIKISTIRMA: $PKT_SIKISTIRMA" + if [ "$PKT_SIKISTIRMA" != "yok" ]; then + info "PKT_SIKISTIRMA_MODU: $PKT_SIKISTIRMA_MODU" + fi + + info "isim: ${name}" + if [ ! -z "$version" ]; then + info "versiyon: $version" + fi + if [ ! -z "$release" ]; then + info "surum: $release" + fi + if [ ! -z "$group" ]; then + info "grup: $group" + fi + PKGMK_MD5SUM="$name.`uname -m`.md5sum" + check_directory "$DERLEME_KAYNAKDIZIN" + check_directory "$PKGMK_PACKAGE_DIR" + check_directory "`dirname $DERLEME_SANTIYE`" + + check_pkgfile + + get_package_list + + case $PKT_SIKISTIRMA_MODU in + lz|gz|bz2|xz) + if [ -z $TARGETS ]; then + TARGET="$PKGMK_PACKAGE_DIR/${name}#$version-PKGMK_ARCH.$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU" + fi;; + *) + error "Sıkıstırma modu '$PKT_SIKISTIRMA_MODU' desteklenmiyor" + exit $E_GENERAL + ;; + esac + case $PKT_SIKISTIRMA_MODU in + gz) COMPRESSION="-z" ;; + bz2) export COMPRESSION="-j" ;; + xz) export COMPRESSION="-J" ;; + esac + + if [ "$PKGMK_CLEAN_ONLY" = "evet" ]; then + clean + remove_source + update_repo + exit 0 + fi + if [ "$PKGMK_UPDATE_COLLECTION" = "evet" ]; then + update_collection_repo + exit 0 + fi + if [ "$PKGMK_UPDATE_REPO" = "evet" ]; then + update_repo + exit 0 + fi + if [ "$PKGMK_UPDATE_FOOTPRINT" = "evet" ]; then + update_footprint + exit 0 + fi + + if [ "$SOZDIZIM_KONTROL" = "evet" ]; then + update_collection_repo + info "description: $description" + info "url: $url" + info "packager: $packager" + info "maintainer: $maintainer" + exit 0 + fi + + if [ "$PKGMK_UPDATE_MD5SUM" = "evet" ]; then + download_source + check_file "$PKGMK_MD5SUM" + make_md5sum > $PKGMK_MD5SUM + info "Md5sum updated." + exit 0 + fi + + if [ "$PKGMK_DOWNLOAD_ONLY" = "evet" ]; then + download_source + exit 0 + fi + + if [ "$PKGMK_EXTRACT_ONLY" = "evet" ]; then + download_source + make_work_dir + info "Extracting sources of package '${name}-$version'." + unpack_source + exit 0 + fi + + if [ "$PKGMK_UP_TO_DATE" = "evet" ]; then + if [ ! -z $TARGETS ]; then + for TARGET in ${TARGETS[@]}; do + if [ "`build_needed`" = "evet" ]; then + info "Package '$TARGET' is not up to date." + else + info "Package '$TARGET' is up to date." + fi + done + else + if [ "`build_needed`" = "evet" ]; then + info "Package '$TARGET' is not up to date." + else + info "Package '$TARGET' is up to date." + fi + fi + exit 0 + + fi + # From here on it's need to check the base package not any group which means + if [ -z $TARGETS ]; then + TARGET=$PKGMK_PACKAGE_DIR/${name}#$version-$PKGMK_ARCH.$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU + if [ "`build_needed`" = "yok" ] && [ "$PKGMK_FORCE" = "yok" ] && [ "$PKGMK_CHECK_MD5SUM" = "yok" ]; then + info "Package '$TARGET' is up to date." + else + download_source + derle + fi + else + FOUND=false + for TARGET in ${TARGETS[@]}; do + if [ "`build_needed`" = "yok" ] && [ "$PKGMK_FORCE" = "yok" ] && [ "$PKGMK_CHECK_MD5SUM" = "yok" ]; then + if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ]; then + FOUND=true + fi + info "Package '$TARGET' is up to date." + else + download_source + derle + break + fi + done + fi + if [ ! -z $FOUND ] ; then + if [ $FOUND != true ]; then + download_source + PKGMK_BUILDVER="`get_package_builddate $TARGET`" + TARGET=$PKGMK_PACKAGE_DIR/${name}#$version-$PKGMK_ARCH.$PKT_UZANTISI + derle $TARGET + fi + fi + if [ "$DERLE_KUR" != "yok" ]; then + install_package + fi + if [ "$PKT_SIKISTIRMA" = "evet" ]; then + cd $PKGMK_PACKAGE_DIR + get_package_list + for TARGET in ${TARGETS[@]}; do + if [ "${TARGET:$((${#TARGET} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then + compress_archive $TARGET + fi + done + fi + if [ "$PKGMK_KEEP_SOURCES" != "evet" ]; then + remove_source + fi + if [ "$PKGMK_CLEAN" != "yok" ]; then + clean + unset TARGETS + if [ "$REPO_YOKSAY" == "evet" ];then + clean_repo_files + fi + fi + if [ "$REPO_YOKSAY" != "evet" ] && [ "$PKGMK_CLEAN" != "evet" ]; then + update_repo + fi + if [ "$KOLEKSIYON_YOKSAY" != "evet" ]; then + update_collection_repo + fi + exit 0 +} + +trap "interrupted" SIGHUP SIGINT SIGQUIT SIGTERM + +export LC_ALL=POSIX +DERLEME_AYARDOSYASI="/etc/mpsd.conf" +readonly PKGMK_VERSION="1.0" +readonly PKGMK_COMMAND="$0" +readonly PKGMK_ROOT="$PWD" +PKGMK_PACKAGE_DIR="$PWD" + +PKGMK_BUILDVER=`date +%s` +#PKGMK_BUILDVER="#" + +PKT_UZANTISI="mps" + +REPO_DOSYASI=".PKGREPO" + + +PKGMK_PKGFILE="talimat" +PKGMK_MD5SUM="$name.`uname -m`.md5sum" +PKGMK_NOSTRIP=".nostrip" + +PKGMK_KEEP_SOURCES="yok" +PKGMK_CLEAN="evet" +PAKET_KURMA="evet" + +PAKET_GRUPLAR=() +PAKET_LOKAL="tr" + +PKGMK_SOURCE_MIRRORS=() +DERLEME_KAYNAKDIZIN="$PWD" +DERLEME_SANTIYE="$PWD/work" +PKGMK_DOWNLOAD="yok" +DOSYAIZLEME_YOKSAY="evet" +PKGMK_IGNORE_NEW="evet" +MD5SUM_YOKSAY="evet" +SURUM_YOKSAY="yok" +REPO_YOKSAY="evet" +KOLEKSIYON_YOKSAY="evet" +PKGMK_IGNORE_RUNTIMEDEPS="evet" + +PKGMK_NO_STRIP="yok" + +PKT_SIKISTIRMA_MODU="lz" + +PKT_SIKISTIRMA="yok" + +DERLE_KUR="yok" +PKGMK_RECURSIVE="yok" + +PKGMK_DOWNLOAD_ONLY="yok" +PKGMK_EXTRACT_ONLY="yok" +PKGMK_IGNORE_UNPACK="yok" +PKGMK_UP_TO_DATE="yok" +PKGMK_UPDATE_FOOTPRINT="yok" +PKGMK_FORCE="yok" +PKGMK_KEEP_WORK="yok" + +PKGMK_UPDATE_MD5SUM="yok" +PKGMK_CHECK_MD5SUM="yok" + +main "$@" + +# End of file diff --git a/mps-0.8/mpsd.conf b/mps-0.8/mpsd.conf new file mode 100644 index 000000000..3b3f508bd --- /dev/null +++ b/mps-0.8/mpsd.conf @@ -0,0 +1,31 @@ +export CFLAGS="-O2 -pipe" +export CXXFLAGS="${CFLAGS}" + +case "`uname -m`" in + "x86_64"|"") + export MAKEFLAGS="-j5" + ;; + "i686") + export MAKEFLAGS="-j2" + export CFLAGS="${CFLAGS} -m32" + export CXXFLAGS="${CXXFLAGS} -m32" + export LDFLAGS="${LDFLAGS} -m32" + ;; + *) + echo "bilinmeyen mimari..cıkılıyor." + exit 1 + ;; +esac +DERLEME_SANTIYE="/tmp/work" +DERLEME_KAYNAKDIZIN="/sources" +PKGMK_SYNC_FILES="yok" +PKT_SIKISTIRMA="evet" +DOSYAIZLEME_YOKSAY="evet" +PKGMK_UPDATE_INDEX="evet" +PKGMK_KEEP_SOURCES="evet" +MD5SUM_YOKSAY="evet" +PKGMK_CLEAN="yok" +PAKET_GRUPLAR=() +PAKET_LOKAL="tr" +KOLEKSIYON_YOKSAY="yok" +SURUM_YOKSAY="yok" diff --git a/mps-0.8/onmpsd.conf b/mps-0.8/onmpsd.conf new file mode 100644 index 000000000..82856d62e --- /dev/null +++ b/mps-0.8/onmpsd.conf @@ -0,0 +1,32 @@ +export CFLAGS="-O2 -pipe" +export CXXFLAGS="${CFLAGS}" + +case "`uname -m`" in + "x86_64"|"") + export MAKEFLAGS="-j5" + ;; + "i686") + export MAKEFLAGS="-j2" + export CFLAGS="${CFLAGS} -m32" + export CXXFLAGS="${CXXFLAGS} -m32" + export LDFLAGS="${LDFLAGS} -m32" + ;; + *) + echo "bilinmeyen mimari..cıkılıyor." + exit 1 + ;; +esac +DERLEME_SANTIYE="/tmp/work" +DERLEME_KAYNAKDIZIN="/sources" +PKGMK_SYNC_FILES="yok" +PKT_SIKISTIRMA="evet" +DOSYAIZLEME_YOKSAY="evet" +PKGMK_UPDATE_INDEX="evet" +PKGMK_KEEP_SOURCES="evet" +MD5SUM_YOKSAY="evet" +PKGMK_CLEAN="yok" +PAKET_GRUPLAR=(devel service) +PAKET_LOKAL="tr" +KOLEKSIYON_YOKSAY="yok" +SURUM_YOKSAY="evet" +PAKETSIZ_DERLEME="evet"